Make WordPress Core

Ticket #10187: 10187.patch

File 10187.patch, 991 bytes (added by peaceablewhale, 16 years ago)
  • pluggable.php

     
    847847 * @return bool False if $location is not set
    848848 */
    849849function wp_redirect($location, $status = 302) {
    850         global $is_IIS;
    851 
     850        global $is_IIS, $server_version;
     851       
    852852        $location = apply_filters('wp_redirect', $location, $status);
    853853        $status = apply_filters('wp_redirect_status', $status, $location);
    854 
     854       
    855855        if ( !$location ) // allows the wp_redirect filter to cancel a redirect
    856856                return false;
    857 
     857       
    858858        $location = wp_sanitize_redirect($location);
    859 
    860         if ( $is_IIS ) {
    861                 header("Refresh: 0;url=$location");
    862         } else {
    863                 if ( php_sapi_name() != 'cgi-fcgi' )
    864                         status_header($status); // This causes problems on IIS and some FastCGI setups
     859       
     860        if($is_IIS == true && $server_version <= 5) {
     861                header("Refresh: 0; url=$location");
     862        }
     863        else {
     864                status_header($status);
    865865                header("Location: $location");
    866866        }
    867867}