trying Ryan's suggestion for #3215

git-svn-id: http://svn.automattic.com/wordpress/branches/2.0@4514 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
markjaquith 2006-11-22 04:59:31 +00:00
parent 4411066167
commit 57ff8770c0
2 changed files with 6 additions and 3 deletions

View File

@ -2228,8 +2228,10 @@ function status_header( $header ) {
elseif ( 410 == $header )
$text = 'Gone';
@header("HTTP/1.1 $header $text");
@header("Status: $header $text");
if ( substr(php_sapi_name(), 0, 3) == 'cgi' )
@header("HTTP/1.1 $header $text");
else
@header("Status: $header $text");
}
function nocache_headers() {

View File

@ -265,7 +265,8 @@ function wp_redirect($location, $status = 302) {
if ( $is_IIS ) {
header("Refresh: 0;url=$location");
} else {
status_header($status); // This causes problems on IIS
if ( php_sapi_name() != 'cgi-fcgi' )
status_header($status); // This causes problems on IIS and some FastCGI setups
header("Location: $location");
}
}