summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
Diffstat (limited to 'system')
-rw-r--r--system/helpers/url_helper.php15
1 files changed, 10 insertions, 5 deletions
diff --git a/system/helpers/url_helper.php b/system/helpers/url_helper.php
index f819b96e9..f9650cd04 100644
--- a/system/helpers/url_helper.php
+++ b/system/helpers/url_helper.php
@@ -532,11 +532,16 @@ if ( ! function_exists('redirect'))
}
elseif ($method !== 'refresh' && (empty($code) OR ! is_numeric($code)))
{
- // Reference: http://en.wikipedia.org/wiki/Post/Redirect/Get
- $code = (isset($_SERVER['REQUEST_METHOD'], $_SERVER['SERVER_PROTOCOL'])
- && $_SERVER['REQUEST_METHOD'] === 'POST'
- && $_SERVER['SERVER_PROTOCOL'] === 'HTTP/1.1')
- ? 303 : 302;
+ if (isset($_SERVER['SERVER_PROTOCOL'], $_SERVER['REQUEST_METHOD']) && $_SERVER['SERVER_PROTOCOL'] === 'HTTP/1.1')
+ {
+ $code = ($_SERVER['REQUEST_METHOD'] !== 'GET')
+ ? 303 // reference: http://en.wikipedia.org/wiki/Post/Redirect/Get
+ : 307;
+ }
+ else
+ {
+ $code = 302;
+ }
}
switch ($method)