summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-10-05 09:42:06 +0200
committerAndrey Andreev <narf@bofh.bg>2012-10-05 09:42:06 +0200
commitf20bca9e065751fc271cb650f9246073492eccea (patch)
treefdaf8ce4f07b712fa4388b0d84b457b28c46cf29
parent5b92ae1dfb6ac99630693d193b0d3f60f9df525f (diff)
parent0fc4a10fab7041585def63ff562f5247790915f3 (diff)
Merge pull request #1851 from daniel-honestempire/develop
DRY determining server protocol
-rw-r--r--system/core/Common.php6
-rw-r--r--user_guide_src/source/changelog.rst1
2 files changed, 2 insertions, 5 deletions
diff --git a/system/core/Common.php b/system/core/Common.php
index 57374b07d..e449dd2e0 100644
--- a/system/core/Common.php
+++ b/system/core/Common.php
@@ -488,13 +488,9 @@ if ( ! function_exists('set_status_header'))
{
header('Status: '.$code.' '.$text, TRUE);
}
- elseif ($server_protocol === 'HTTP/1.0')
- {
- header('HTTP/1.0 '.$code.' '.$text, TRUE, $code);
- }
else
{
- header('HTTP/1.1 '.$code.' '.$text, TRUE, $code);
+ header(($server_protocol ? $server_protocol : 'HTTP/1.1').' '.$code.' '.$text, TRUE, $code);
}
}
}
diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst
index 912f8f8e9..0316c38ab 100644
--- a/user_guide_src/source/changelog.rst
+++ b/user_guide_src/source/changelog.rst
@@ -233,6 +233,7 @@ Release Date: Not Released
- Added ``$config['csrf_regeneration']``, which makes token regeneration optional.
- Added ``$config['csrf_exclude_uris']``, which allows you list URIs which will not have the CSRF validation methods run.
- Changed ``_exception_handler()`` to respect php.ini 'display_errors' setting.
+ - Removed redundant conditional to determine HTTP server protocol in ``set_status_header()``
- Added support for IPv4 range masks (e.g. 192.168.1.1/24) to specify ranges of IP addresses for use with the *proxy_ips* setting.
Bug fixes for 3.0