comparison vendor/guzzlehttp/psr7/src/Request.php @ 17:129ea1e6d783

Update, including to Drupal core 8.6.10
author Chris Cannam
date Thu, 28 Feb 2019 13:21:36 +0000
parents 4c8ae668cc8c
children
comparison
equal deleted inserted replaced
16:c2387f117808 17:129ea1e6d783
43 $this->method = strtoupper($method); 43 $this->method = strtoupper($method);
44 $this->uri = $uri; 44 $this->uri = $uri;
45 $this->setHeaders($headers); 45 $this->setHeaders($headers);
46 $this->protocol = $version; 46 $this->protocol = $version;
47 47
48 if (!$this->hasHeader('Host')) { 48 if (!isset($this->headerNames['host'])) {
49 $this->updateHostFromUri(); 49 $this->updateHostFromUri();
50 } 50 }
51 51
52 if ($body !== '' && $body !== null) { 52 if ($body !== '' && $body !== null) {
53 $this->stream = stream_for($body); 53 $this->stream = stream_for($body);
108 } 108 }
109 109
110 $new = clone $this; 110 $new = clone $this;
111 $new->uri = $uri; 111 $new->uri = $uri;
112 112
113 if (!$preserveHost) { 113 if (!$preserveHost || !isset($this->headerNames['host'])) {
114 $new->updateHostFromUri(); 114 $new->updateHostFromUri();
115 } 115 }
116 116
117 return $new; 117 return $new;
118 } 118 }