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
This commit is contained in:
parent
800443d208
commit
9c4b151ba2
|
@ -876,6 +876,8 @@ if ( !function_exists('wp_redirect') ) :
|
||||||
* @return bool False if $location is not set
|
* @return bool False if $location is not set
|
||||||
*/
|
*/
|
||||||
function wp_redirect($location, $status = 302) {
|
function wp_redirect($location, $status = 302) {
|
||||||
|
global $is_IIS;
|
||||||
|
|
||||||
$location = apply_filters('wp_redirect', $location, $status);
|
$location = apply_filters('wp_redirect', $location, $status);
|
||||||
$status = apply_filters('wp_redirect_status', $status, $location);
|
$status = apply_filters('wp_redirect_status', $status, $location);
|
||||||
|
|
||||||
|
@ -884,8 +886,9 @@ function wp_redirect($location, $status = 302) {
|
||||||
|
|
||||||
$location = wp_sanitize_redirect($location);
|
$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
|
status_header($status); // This causes problems on IIS and some FastCGI setups
|
||||||
|
|
||||||
header("Location: $location", true, $status);
|
header("Location: $location", true, $status);
|
||||||
}
|
}
|
||||||
endif;
|
endif;
|
||||||
|
|
Loading…
Reference in New Issue