summaryrefslogtreecommitdiffstats
path: root/system/core
diff options
context:
space:
mode:
Diffstat (limited to 'system/core')
-rw-r--r--system/core/Input.php18
-rw-r--r--system/core/Router.php2
-rw-r--r--system/core/Security.php2
3 files changed, 15 insertions, 7 deletions
diff --git a/system/core/Input.php b/system/core/Input.php
index 12332cf51..b0bbb7b8d 100644
--- a/system/core/Input.php
+++ b/system/core/Input.php
@@ -799,19 +799,27 @@ class CI_Input {
*/
public function get_request_header($index, $xss_clean = FALSE)
{
- if (empty($this->headers))
+ static $headers;
+
+ if ( ! isset($headers))
{
- $this->request_headers();
+ empty($this->headers) OR $this->request_headers();
+ foreach ($this->headers as $key => $value)
+ {
+ $headers[strtolower($key)] = $value;
+ }
}
- if ( ! isset($this->headers[$index]))
+ $index = strtolower($index);
+
+ if ( ! isset($headers[$index]))
{
return NULL;
}
return ($xss_clean === TRUE)
- ? $this->security->xss_clean($this->headers[$index])
- : $this->headers[$index];
+ ? $this->security->xss_clean($headers[$index])
+ : $headers[$index];
}
// --------------------------------------------------------------------
diff --git a/system/core/Router.php b/system/core/Router.php
index f91d3f6ec..051000533 100644
--- a/system/core/Router.php
+++ b/system/core/Router.php
@@ -105,7 +105,7 @@ class CI_Router {
/**
* Enable query strings flag
*
- * Determines wether to use GET parameters or segment URIs
+ * Determines whether to use GET parameters or segment URIs
*
* @var bool
*/
diff --git a/system/core/Security.php b/system/core/Security.php
index 9cef42439..7c5199255 100644
--- a/system/core/Security.php
+++ b/system/core/Security.php
@@ -275,7 +275,7 @@ class CI_Security {
$secure_cookie,
config_item('cookie_httponly')
);
- log_message('info', 'CRSF cookie sent');
+ log_message('info', 'CSRF cookie sent');
return $this;
}