diff options
author | vlakoff <vlakoff@gmail.com> | 2012-09-11 13:10:21 +0200 |
---|---|---|
committer | vlakoff <vlakoff@gmail.com> | 2012-09-12 03:54:24 +0200 |
commit | aab26a12a98ca99d956ef24e36c2262938631d73 (patch) | |
tree | 0427a2a18b7d0a98daa0050ea20fa359ffff822e /system | |
parent | f7e23b3357c73cc9eb50c59f444181fcfaa2267d (diff) |
Better server test in redirect() of URL helper
"Location" header bugs are specific to IIS; previous test was matching
all HTTP servers under Windows.
This test isn't perfect yet ($_SERVER['SERVER_SOFTWARE'], which
corresponds to the "Server" header of HTTP response, might be missing),
but there is no perfect test.
"Refresh" method makes the window blank for quite a noticeable time,
so let's not affect other servers because of IIS.
Diffstat (limited to 'system')
-rw-r--r-- | system/helpers/url_helper.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/system/helpers/url_helper.php b/system/helpers/url_helper.php index 57208c948..b1f5eccf1 100644 --- a/system/helpers/url_helper.php +++ b/system/helpers/url_helper.php @@ -534,7 +534,7 @@ if ( ! function_exists('redirect')) } // IIS environment likely? Use 'refresh' for better compatibility - if (DIRECTORY_SEPARATOR !== '/' && $method === 'auto') + if ($method === 'auto' && isset($_SERVER['SERVER_SOFTWARE']) && strpos($_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS') !== FALSE) { $method = 'refresh'; } |