Skip to content

Commit

Permalink
feat:http-message:移除header小写处理
Browse files Browse the repository at this point in the history
  • Loading branch information
onanying committed Jul 28, 2021
1 parent dee422d commit f0ab86b
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions src/Message.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ public function getHeaders()
*/
public function hasHeader($name)
{
$name = strtolower($name);
return isset($this->headers[$name]);
}

Expand All @@ -121,7 +120,6 @@ public function hasHeader($name)
*/
public function getHeader($name)
{
$name = strtolower($name);
if ($this->hasHeader($name)) {
return $this->headers[$name];
}
Expand Down Expand Up @@ -149,7 +147,6 @@ public function getHeader($name)
*/
public function getHeaderLine($name)
{
$name = strtolower($name);
if ($this->hasHeader($name)) {
return implode(',', $this->headers[$name]);
}
Expand Down Expand Up @@ -186,7 +183,6 @@ public function getHeadersLine()
*/
public function withHeader($name, $value)
{
$name = strtolower($name);
if (is_scalar($value)) {
$this->headers[$name] = [(string)$value];
} else if (is_array($value)) {
Expand Down Expand Up @@ -219,7 +215,6 @@ public function withHeader($name, $value)
*/
public function withAddedHeader($name, $value)
{
$name = strtolower($name);
$header = $this->getHeader($name);
if (is_scalar($value)) {
array_push($header, (string)$value);
Expand Down Expand Up @@ -248,8 +243,6 @@ public function withAddedHeader($name, $value)
*/
public function withoutHeader($name)
{
// TODO: Implement withoutHeader() method.
$name = strtolower($name);
unset($this->headers[$name]);
return $this;
}
Expand All @@ -261,7 +254,6 @@ public function withoutHeader($name)
*/
public function getBody()
{
// TODO: Implement getBody() method.
return $this->body;
}

Expand All @@ -280,7 +272,6 @@ public function getBody()
*/
public function withBody(StreamInterface $body)
{
// TODO: Implement withBody() method.
$this->body = $body;
return $this;
}
Expand Down

0 comments on commit f0ab86b

Please sign in to comment.