summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCJ <chern.jie@mig33global.com>2013-04-16 08:17:53 +0200
committerCJ <chern.jie@mig33global.com>2013-04-16 10:49:36 +0200
commit826990fc88208103142385f1a448bb4771213155 (patch)
tree295551bfc35d0bfe1239f7282b7d00f1943fee9a
parent5c18265fb5e5a5d8d71be0a5ff2b1a12e0222585 (diff)
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;
-rw-r--r--system/core/Input.php16
1 files 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;