Make WordPress Core

Ticket #17047: 17047.patch

File 17047.patch, 799 bytes (added by SergeyBiryukov, 13 years ago)
  • wp-includes/load.php

     
    4848
    4949        $_SERVER = array_merge( $default_server_values, $_SERVER );
    5050
     51        // Fix bad assumption of REQUEST_URI
     52        // http://en.wikipedia.org/wiki/URI_scheme#Examples
     53        // http://www.w3.org/Protocols/rfc2616/rfc2616-sec5.html#sec5.1.2
     54        if ( $_SERVER['REQUEST_URI'][0] != '/' )
     55                $_SERVER[ 'REQUEST_URI' ] = preg_replace( '(^https?://' . $_SERVER[ 'HTTP_HOST' ] . ')i' , NULL , $_SERVER[ 'REQUEST_URI' ] );
     56
    5157        // Fix for IIS when running with PHP ISAPI
    5258        if ( empty( $_SERVER['REQUEST_URI'] ) || ( php_sapi_name() != 'cgi-fcgi' && preg_match( '/^Microsoft-IIS\//', $_SERVER['SERVER_SOFTWARE'] ) ) ) {
    5359