Skip to content

Commit

Permalink
RequestFactory: removes absolute URI from $_SERVER['REQUEST_URI'] (is…
Browse files Browse the repository at this point in the history
…sue #91) (#93)
  • Loading branch information
ondrej-tuhacek authored and dg committed Jun 17, 2016
1 parent 6ef04f7 commit dff9775
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Http/RequestFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ public function createHttpRequest()

// path & query
$requestUrl = isset($_SERVER['REQUEST_URI']) ? $_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 dff9775

Please sign in to comment.