Skip to content

Commit b09482e

Browse files
authored
Merge pull request dingo#1201 from pulkitjalan/patch-2
Allow internal requests via commands
2 parents 1f022fa + 402bf81 commit b09482e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Dispatcher.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -462,8 +462,9 @@ protected function createRequest($verb, $uri, $parameters)
462462

463463
// If the URI does not have a scheme then we can assume that there it is not an
464464
// absolute URI, in this case we'll prefix the root requests path to the URI.
465-
if (! parse_url($uri, PHP_URL_SCHEME)) {
466-
$uri = rtrim($this->getRootRequest()->root(), '/').'/'.ltrim($uri, '/');
465+
$rootUrl = $this->getRootRequest()->root();
466+
if ((! parse_url($uri, PHP_URL_SCHEME)) && parse_url($rootUrl) !== false) {
467+
$uri = rtrim($rootUrl, '/').'/'.ltrim($uri, '/');
467468
}
468469

469470
$request = InternalRequest::create(

0 commit comments

Comments
 (0)