diff options
author | CJ <chern.jie@mig33global.com> | 2013-04-16 18:55:48 +0200 |
---|---|---|
committer | CJ <chern.jie@mig33global.com> | 2013-04-16 18:55:48 +0200 |
commit | d08e18cafb31af586002e4de39f12cf8e048383b (patch) | |
tree | fad4095d77bfbee2838834b971f6aec9edb83a96 /system/core/Input.php | |
parent | 71cff1da396ba0c56644c04fdd2729db6766c557 (diff) |
See #2409: Remove double replacing of dashes and instead change `Content-Type` to `CONTENT_TYPE`
Diffstat (limited to 'system/core/Input.php')
-rw-r--r-- | system/core/Input.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/system/core/Input.php b/system/core/Input.php index 7a6b6e4e0..a0c5552f6 100644 --- a/system/core/Input.php +++ b/system/core/Input.php @@ -803,7 +803,7 @@ class CI_Input { } else { - $headers['Content-Type'] = isset($_SERVER['CONTENT_TYPE']) ? $_SERVER['CONTENT_TYPE'] : @getenv('CONTENT_TYPE'); + $headers['CONTENT_TYPE'] = isset($_SERVER['CONTENT_TYPE']) ? $_SERVER['CONTENT_TYPE'] : @getenv('CONTENT_TYPE'); foreach ($_SERVER as $key => $val) { @@ -816,7 +816,7 @@ class CI_Input { // take SOME_HEADER and turn it into Some-Header foreach ($headers as $key => $val) { - $key = str_replace(array('_', '-'), ' ', strtolower($key)); + $key = str_replace('_', ' ', strtolower($key)); $key = str_replace(' ', '-', ucwords($key)); $this->headers[$key] = $val; |