-
Notifications
You must be signed in to change notification settings - Fork 2.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
Remove empty path normalization to support base path use-case #487
Conversation
👍 |
1 similar comment
👍 |
Ironically, we chose to always return a @Tobion I know that @simensen has shared a number of potential solutions with you, which you've brushed away as being insufficient, without demonstrating why. I'd like to see the why before we make a decision on this. |
Enforcing that paths be absolute basically removes the ability for a PSR-7 URI to represent a relative URI that can be combined accurately with a base URI. For example, in the Guzzle PSR-7 library, I had to make the base URI resolution function accept a string as the relative URI to work around this: https://github.com/guzzle/psr7/blob/master/src/Uri.php#L115. If I were to use a UriInterface object that always returns "/" for |
@mtdowling Now, that is an excellent breakdown for me; thanks! @pmjones and/or @simensen — go ahead and merge! (and note to self: a whole lot of rewriting in phly/conduit to do…) |
Remove empty path normalization to support base path use-case
what @mtdowling explained is exactly what I raided as concern. But his example goes even further and says, that UriInterface should also support relative (rootless in RFC 3986 terms) paths that do not start with a slash. Then we also need to adjust the |
I'll provide a PR to change that. |
This is to fix https://groups.google.com/forum/#!topic/php-fig/TswE4FD0SyM
It basically reverts #460 and clarifies things.
Also since we do not apply other normalization of the path as well (e.g. dot segment resolving), I think this is consistent.