Skip to content

Commit f131d5e

Browse files
committed
lfixed lower key of header
1 parent 9d2bdee commit f131d5e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Response.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public function __construct($id = null, $httpCode = 0, $body = '', array $header
1919
{
2020
$this->id = $id ?: uniqid('', true);
2121
$this->httpCode = $httpCode;
22-
$this->headers = $headers;
22+
$this->headers = array_change_key_case($headers, CASE_LOWER);
2323
$this->body = $body;
2424
$this->error = $error;
2525
}
@@ -31,6 +31,7 @@ public function getHttpCode()
3131

3232
public function getHeader($key)
3333
{
34+
$key = strtolower($key);
3435
return isset($this->headers[$key]) ? $this->headers[$key] : null;
3536
}
3637

0 commit comments

Comments
 (0)