diff --git a/src/http-message/src/Base/Request.php b/src/http-message/src/Base/Request.php index 92ffd7f6a..02b30f69c 100755 --- a/src/http-message/src/Base/Request.php +++ b/src/http-message/src/Base/Request.php @@ -239,11 +239,11 @@ class Request implements RequestInterface $host .= ':' . $port; } + $header = 'host'; if ($this->hasHeader('host')) { - $header = $this->getHeaderLine('host'); + $host = $this->getHeaderLine('host'); } else { - $header = 'Host'; - $this->headerNames['host'] = 'Host'; + $this->headerNames['host'] = 'host'; } // Ensure Host is the first header. $this->headers = [$header => [$host]] + $this->headers;