Skip to content

Commit

Permalink
RequestFactory: removed support for ORIG_PATH_INFO used by old IIS
Browse files Browse the repository at this point in the history
see #31
  • Loading branch information
dg committed Dec 26, 2014
1 parent 5fe8503 commit f51ef62
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions src/Http/RequestFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,18 +81,7 @@ public function createHttpRequest()
}

// path & query
if (isset($_SERVER['REQUEST_URI'])) { // Apache, IIS 6.0
$requestUrl = $_SERVER['REQUEST_URI'];

} elseif (isset($_SERVER['ORIG_PATH_INFO'])) { // IIS 5.0 (PHP as CGI ?)
$requestUrl = $_SERVER['ORIG_PATH_INFO'];
if (isset($_SERVER['QUERY_STRING']) && $_SERVER['QUERY_STRING'] != '') {
$requestUrl .= '?' . $_SERVER['QUERY_STRING'];
}
} else {
$requestUrl = '';
}

$requestUrl = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : '';
$requestUrl = Strings::replace($requestUrl, $this->urlFilters['url']);
$tmp = explode('?', $requestUrl, 2);
$url->setPath(Strings::fixEncoding(Strings::replace($tmp[0], $this->urlFilters['path'])));
Expand Down

0 comments on commit f51ef62

Please sign in to comment.