Skip to content

Commit

Permalink
remove absolute URI from $_SERVER['REQUEST_URI'] (issue nette#91)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ondřej Tuháček committed May 6, 2016
1 parent f980a19 commit 1ff0068
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Http/RequestFactory.php
Expand Up @@ -82,7 +82,7 @@ public function createHttpRequest()

// path & query
$requestUrl = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : '/';
$requestUrl = preg_replace('#^\w++://[^/]++#', '', $_SERVER['REQUEST_URI']);
$requestUrl = preg_replace('#^\w++://[^/]++#', '', $requestUrl);
$requestUrl = Strings::replace($requestUrl, $this->urlFilters['url']);
$tmp = explode('?', $requestUrl, 2);
$path = Url::unescape($tmp[0], '%/?#');
Expand Down

0 comments on commit 1ff0068

Please sign in to comment.