-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Slim 3 getPath in subdirectory missing left most slash #1724
Comments
This is intentional. If the leading |
Same as #1554. Even though intentional it still is confusing for me that behaviour is different depending on whether Slim is installed in subfolder or not. I guess there will be lots of bug reports and support requests about this. In the end I just ended up doing something like following: $path = "/" . $request->getUri()->getPath();
$path = str_replace("//", "/", $path); |
Do you mean "base path is set" -> "leading Also, what is the motivation behind this behavior? Is this part of PSR-7? |
Example:
https://gist.github.com/geggleto/6cc2d792305fefc2bf64
http://dev/slim3/develop-testbed/public/yes/no => yes/no
http://develop-testbed.slim3.dev/yes/no => /yes/no
getPath is getting ltrim'd somewhere.
The text was updated successfully, but these errors were encountered: