Restore pre-3.1 "Status:" header handling for IIS in wp_redirect. Revist in 3.2 to see if it's still required. Fixes #10187

git-svn-id: https://develop.svn.wordpress.org/trunk@16907 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dion Hulse 2010-12-14 10:15:31 +00:00
parent 44db2effda
commit 01a2da49e1
1 changed files with 4 additions and 1 deletions

View File

@ -876,6 +876,8 @@ if ( !function_exists('wp_redirect') ) :
* @return bool False if $location is not set
*/
function wp_redirect($location, $status = 302) {
global $is_IIS;
$location = apply_filters('wp_redirect', $location, $status);
$status = apply_filters('wp_redirect_status', $status, $location);
@ -884,8 +886,9 @@ function wp_redirect($location, $status = 302) {
$location = wp_sanitize_redirect($location);
if ( php_sapi_name() != 'cgi-fcgi' )
if ( !$is_IIS && php_sapi_name() != 'cgi-fcgi' )
status_header($status); // This causes problems on IIS and some FastCGI setups
header("Location: $location", true, $status);
}
endif;