From 9c4b151ba24b6aceef5a843037048d31ee77e01d Mon Sep 17 00:00:00 2001 From: dd32 Date: Tue, 14 Dec 2010 10:15:31 +0000 Subject: [PATCH] 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: http://svn.automattic.com/wordpress/trunk@16907 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/pluggable.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wp-includes/pluggable.php b/wp-includes/pluggable.php index e6581bd860..69a3a6c19b 100644 --- a/wp-includes/pluggable.php +++ b/wp-includes/pluggable.php @@ -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;