Make WordPress Core

Ticket #10187: 10187_ruslany.patch

File 10187_ruslany.patch, 1.3 KB (added by ruslany, 15 years ago)

Updated patch that preserves the fixes for apache/cgi

  • wp-includes/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;
    854852
    855853        $location = apply_filters('wp_redirect', $location, $status);
    856854        $status = apply_filters('wp_redirect_status', $status, $location);
     
    860858
    861859        $location = wp_sanitize_redirect($location);
    862860
    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         }
     861        if ( php_sapi_name() != 'cgi-fcgi' )
     862                status_header($status); // This causes problems on some FastCGI setups
     863        header("Location: $location", true, $status);
    870864}
    871865endif;
    872866