REQUEST_URI bug on IIS7
|Reported by:||bforchhammer||Owned by:|
there's a bug on IIS7 which sets $_SERVER['REQUEST_URI'] to "/index.php" instead of leaving it empty (as afaik it should be on IIS): KB954946
The value of $_SERVER['HTTP_X_ORIGINAL_URL'] contains the right URI and should be used instead of "/index.php".
Usually REQUEST_URI is set to the value of HTTP_X_ORIGINAL_URL in wp_settings.php, line 67, but because that block is protected with a if ( empty( $_SERVER['REQUEST_URI'] ) ) it does not get used on our server.
I know there's a patch for KB954946 but not all wordpress users might be able to apply patches to their servers; is there any reason why we cannot use HTTP_X_ORIGINAL_URL right away if it is set and not empty?