From 826990fc88208103142385f1a448bb4771213155 Mon Sep 17 00:00:00 2001 From: CJ Date: Tue, 16 Apr 2013 14:17:53 +0800 Subject: apache_request_headers need not go through recapitalization of incoming headers and should be pass through as is. This is a follow up on #2107 (c82b57b) by @danhunsaker; --- system/core/Input.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/system/core/Input.php b/system/core/Input.php index 6690b7f2e..31bd7008b 100644 --- a/system/core/Input.php +++ b/system/core/Input.php @@ -793,7 +793,7 @@ class CI_Input { // In Apache, you can simply call apache_request_headers() if (function_exists('apache_request_headers')) { - $headers = apache_request_headers(); + $this->headers = apache_request_headers(); } else { @@ -806,15 +806,15 @@ class CI_Input { $headers[$header] = $this->_fetch_from_array($_SERVER, $key, $xss_clean); } } - } - // take SOME_HEADER and turn it into Some-Header - foreach ($headers as $key => $val) - { - $key = str_replace(array('_', '-'), ' ', strtolower($key)); - $key = str_replace(' ', '-', ucwords($key)); + // take SOME_HEADER and turn it into Some-Header + foreach ($headers as $key => $val) + { + $key = str_replace('_', ' ', strtolower($key)); + $key = str_replace(' ', '-', ucwords($key)); - $this->headers[$key] = $val; + $this->headers[$key] = $val; + } } return $this->headers; -- cgit v1.2.3-24-g4f1b