Ticket #10187: 10187_drop_iis5.patch

File 10187_drop_iis5.patch, 1.2 KB (added by peaceablewhale, 3 years ago)

Removed the call to status_header()

  • pluggable.php

     
    839839 
    840840if ( !function_exists('wp_redirect') ) : 
    841841/** 
    842  * Redirects to another page, with a workaround for the IIS Set-Cookie bug. 
     842 * Redirects to another page 
    843843 * 
    844  * @link http://support.microsoft.com/kb/q176113/ 
    845844 * @since 1.5.1 
    846845 * @uses apply_filters() Calls 'wp_redirect' hook on $location and $status. 
    847846 * 
     
    850849 * @return bool False if $location is not set 
    851850 */ 
    852851function wp_redirect($location, $status = 302) { 
    853         global $is_IIS; 
    854  
    855852        $location = apply_filters('wp_redirect', $location, $status); 
    856853        $status = apply_filters('wp_redirect_status', $status, $location); 
    857  
     854         
    858855        if ( !$location ) // allows the wp_redirect filter to cancel a redirect 
    859856                return false; 
    860  
     857         
    861858        $location = wp_sanitize_redirect($location); 
    862  
    863         if ( $is_IIS ) { 
    864                 header("Refresh: 0;url=$location"); 
    865         } else { 
    866                 if ( php_sapi_name() != 'cgi-fcgi' ) 
    867                         status_header($status); // This causes problems on IIS and some FastCGI setups 
    868                 header("Location: $location", true, $status); 
    869         } 
     859         
     860        header("Location: $location", true, $status); 
    870861} 
    871862endif; 
    872863