Skip to content

Commit

Permalink
Trim the root request path.
Browse files Browse the repository at this point in the history
Signed-off-by: Jason Lewis <[email protected]>
  • Loading branch information
jasonlewis committed Dec 2, 2015
1 parent e43f067 commit 02dd0e9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Dispatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ protected function createRequest($verb, $uri, $parameters)
// If the URI does not have a scheme then we can assume that there it is not an
// absolute URI, in this case we'll prefix the root requests path to the URI.
if (! parse_url($uri, PHP_URL_SCHEME)) {
$uri = $this->getRootRequest()->root().'/'.ltrim($uri);
$uri = rtrim($this->getRootRequest()->root(), '/').'/'.ltrim($uri);
}

$request = InternalRequest::create($uri, $verb, $parameters, $this->cookies, $this->uploads, [], $this->content);
Expand Down

0 comments on commit 02dd0e9

Please sign in to comment.