Use lower case header name

This commit is contained in:
huangzhhui 2019-07-24 01:52:40 +08:00
parent 5a7f83e59f
commit 9b5202a325

View File

@ -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;