Permalink
Browse files

redirect(): fix protocol name in redirection header()

  • Loading branch information...
1 parent 2c56bea commit 6cb344928f6f95551cf227251c35d2c8890bcd88 martinlanghoff committed Dec 27, 2006
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/weblib.php
View
2 lib/weblib.php
@@ -4737,7 +4737,7 @@ function redirect($url, $message='', $delay=-1) {
$delay = 0;
//try header redirection first
- @header('HTTP/1.x 303 See Other'); //302 might not work for POST requests, 303 is ignored by obsolete clients
+ @header($_SERVER['SERVER_PROTOCOL'] . ' 303 See Other'); //302 might not work for POST requests, 303 is ignored by obsolete clients
@header('Location: '.$url);
//another way for older browsers and already sent headers (eg trailing whitespace in config.php)
echo '<meta http-equiv="refresh" content="'. $delay .'; url='. $encodedurl .'" />';

0 comments on commit 6cb3449

Please sign in to comment.