Skip to content
This repository has been archived by the owner on Jun 9, 2018. It is now read-only.

Commit

Permalink
See bcit-ci#2409: Remove double replacing of dashes and instead chang…
Browse files Browse the repository at this point in the history
…e `Content-Type` to `CONTENT_TYPE`
  • Loading branch information
chernjie committed Apr 16, 2013
1 parent 71cff1d commit d08e18c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions system/core/Input.php
Original file line number Diff line number Diff line change
Expand Up @@ -803,7 +803,7 @@ public function request_headers($xss_clean = FALSE)
}
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)
{
Expand All @@ -816,7 +816,7 @@ public function request_headers($xss_clean = FALSE)
// 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;
Expand Down

0 comments on commit d08e18c

Please sign in to comment.