@@ -1201,12 +1201,16 @@ protected function prepareRequestUri()
1201
1201
if ($ this ->headers ->has ('X_ORIGINAL_URL ' ) && false !== stripos (PHP_OS , 'WIN ' )) {
1202
1202
// IIS with Microsoft Rewrite Module
1203
1203
$ requestUri = $ this ->headers ->get ('X_ORIGINAL_URL ' );
1204
+ $ this ->headers ->remove ('X_ORIGINAL_URL ' );
1204
1205
} elseif ($ this ->headers ->has ('X_REWRITE_URL ' ) && false !== stripos (PHP_OS , 'WIN ' )) {
1205
1206
// IIS with ISAPI_Rewrite
1206
1207
$ requestUri = $ this ->headers ->get ('X_REWRITE_URL ' );
1208
+ $ this ->headers ->remove ('X_REWRITE_URL ' );
1207
1209
} elseif ($ this ->server ->get ('IIS_WasUrlRewritten ' ) == '1 ' && $ this ->server ->get ('UNENCODED_URL ' ) != '' ) {
1208
1210
// IIS7 with URL Rewrite: make sure we get the unencoded url (double slash problem)
1209
1211
$ requestUri = $ this ->server ->get ('UNENCODED_URL ' );
1212
+ $ this ->server ->remove ('UNENCODED_URL ' );
1213
+ $ this ->server ->remove ('IIS_WasUrlRewritten ' );
1210
1214
} elseif ($ this ->server ->has ('REQUEST_URI ' )) {
1211
1215
$ requestUri = $ this ->server ->get ('REQUEST_URI ' );
1212
1216
// HTTP proxy reqs setup request uri with scheme and host [and port] + the url path, only use url path
@@ -1220,8 +1224,12 @@ protected function prepareRequestUri()
1220
1224
if ($ this ->server ->get ('QUERY_STRING ' )) {
1221
1225
$ requestUri .= '? ' .$ this ->server<
6F10
/span>->get ('QUERY_STRING ' );
1222
1226
}
1227
+ $ this ->server ->remove ('ORIG_PATH_INFO ' );
1223
1228
}
1224
1229
1230
+ // normalize the request URI to ease creating sub-requests from this request
1231
+ $ this ->server ->set ('REQUEST_URI ' , $ requestUri );
1232
+
1225
1233
return $ requestUri ;
1226
1234
}
1227
1235
0 commit comments