Index: includes/bootstrap.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/bootstrap.inc,v
retrieving revision 1.206.2.3
diff -u -p -r1.206.2.3 bootstrap.inc
--- includes/bootstrap.inc	9 Jul 2008 19:15:59 -0000	1.206.2.3
+++ includes/bootstrap.inc	21 Aug 2008 06:51:57 -0000
@@ -724,14 +724,16 @@ function drupal_validate_utf8($text) {
 }
 
 /**
- * Since $_SERVER['REQUEST_URI'] is only available on Apache, we
- * generate an equivalent using other environment variables.
+ * Since $_SERVER['REQUEST_URI'] is not consistently available on all
+ * platforms, we generate an equivalent using other environment variables.
  */
 function request_uri() {
-
-  if (isset($_SERVER['REQUEST_URI'])) {
+  if (isset($_SERVER['REQUEST_URI']) && strpos($_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS/7') === FALSE) {
     $uri = $_SERVER['REQUEST_URI'];
   }
+  else if (isset($_SERVER['HTTP_X_ORIGINAL_URL'])) {
+    $uri = $_SERVER['HTTP_X_ORIGINAL_URL'];
+  }
   else {
     if (isset($_SERVER['argv'])) {
       $uri = $_SERVER['SCRIPT_NAME'] .'?'. $_SERVER['argv'][0];
@@ -743,7 +745,6 @@ function request_uri() {
       $uri = $_SERVER['SCRIPT_NAME'];
     }
   }
-
   return $uri;
 }
 
