]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-17777 fixed request string encoding in ISS
authorskodak <skodak>
Tue, 6 Jan 2009 12:33:32 +0000 (12:33 +0000)
committerskodak <skodak>
Tue, 6 Jan 2009 12:33:32 +0000 (12:33 +0000)
lib/setuplib.php

index 62bb37e585fc2b84ead9a58594d554e3157ad6c0..0fb0348422eb197c9342d2a01518a156e8c21925 100644 (file)
@@ -137,13 +137,7 @@ function initialise_fullme() {
         //       example rule: RewriteRule ^([^\?]+?\.php)(\/.+)$ $1\?file=$2 [QSA]
 
         if ($_SERVER['QUERY_STRING'] != '') {
-            // iis is decoding the query string, let's reencode it in order to emulate QUERY_STRING in Apache
-            // TODO: move this into lib/setup.php
-            $encoded = urlencode($_SERVER['QUERY_STRING']);
-            $encoded = str_replace(urlencode('='), '=', $encoded);
-            $encoded = str_replace(urlencode('%'), '%', $encoded);
-            $encoded = str_replace(urlencode('&'), '&', $encoded);
-            $rurl['fullpath'] .= '?'.$encoded;
+            $rurl['fullpath'] .= '?'.$_SERVER['QUERY_STRING'];
         }
         $_SERVER['REQUEST_URI'] = $rurl['fullpath']; // extra IIS compatibility