commit | 7a7ad782b2f125622509a77c5a6f94ad4ae0f93c | [log] [tgz] |
---|---|---|
author | Andrey Andreev <narf@bofh.bg> | Mon Nov 12 17:21:01 2012 +0200 |
committer | Andrey Andreev <narf@bofh.bg> | Mon Nov 12 17:21:01 2012 +0200 |
tree | 8b849b80e51492877c60a7b976d33a0ddba68d46 | |
parent | a9ab46d7a031bda304eb9b6658ffaf693b8d9bcb [diff] [blame] |
Some micro-optimizations
diff --git a/system/core/Input.php b/system/core/Input.php index adc5f7a..4d73fa4 100644 --- a/system/core/Input.php +++ b/system/core/Input.php
@@ -768,9 +768,9 @@ foreach ($_SERVER as $key => $val) { - if (strpos($key, 'HTTP_') === 0) + if (sscanf($key, 'HTTP_%s', $header) === 1) { - $headers[substr($key, 5)] = $this->_fetch_from_array($_SERVER, $key, $xss_clean); + $headers[$header] = $this->_fetch_from_array($_SERVER, $key, $xss_clean); } } }