We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent be277f2 commit 3dd9dbaCopy full SHA for 3dd9dba
src/Pecee/Http/Request.php
@@ -27,7 +27,7 @@ public function __construct() {
27
$this->host = $_SERVER['HTTP_HOST'];
28
$this->uri = $_SERVER['REQUEST_URI'];
29
$this->method = (isset($_POST['_method'])) ? strtolower($_POST['_method']) : strtolower($_SERVER['REQUEST_METHOD']);
30
- $this->headers = getallheaders();
+ $this->headers = array_change_key_case(getallheaders(), CASE_LOWER);
31
}
32
33
/**
@@ -105,7 +105,7 @@ public function getUserAgent() {
105
* @return string|null
106
*/
107
public function getHeader($name) {
108
- return (isset($this->headers[$name])) ? $this->headers[$name] : null;
+ return (isset($this->headers[strtolower($name)])) ? $this->headers[strtolower($name)] : null;
109
110
111
0 commit comments