From d08e18cafb31af586002e4de39f12cf8e048383b Mon Sep 17 00:00:00 2001 From: CJ Date: Wed, 17 Apr 2013 00:55:48 +0800 Subject: See #2409: Remove double replacing of dashes and instead change `Content-Type` to `CONTENT_TYPE` --- system/core/Input.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'system') 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; -- cgit v1.2.3-24-g4f1b