-
-
Notifications
You must be signed in to change notification settings - Fork 934
Closed
Description
Hi,
I believe there is a bug in Router.php : when the IRI to be converted contains several times the base URL, then the following code breaks down (line 74):
$pathInfo = str_replace($baseContext->getBaseUrl(), '', $pathInfo);
for example, when the IRI is /s/api/satchels/123
, and a base URL /s
, this returns /apiatchel123
Using
$baseURL = $baseContext->getBaseUrl();
$p = strpos($pathInfo, $baseURL);
if (strpos($pathInfo, $baseURL) === 0) {
$pathInfo = substr($pathInfo, strlen($baseURL));
}
fixes the issue