You mention percent-encoding in passing in that, but it's more fully
addressed in the PR I've submitted.
You have two other concerns in the issue you opened, however, that do
not have anything to do with encoding, but do touch on normalization
concerns:
- whether an empty path or lack of a path should return '' or '/'.
- whether getPath() should resolve relative paths (i.e, paths that
have '..' notation)
Regarding the second, I strongly feel this is something to be done in
a utility library; the URI should reflect how it was provided (with
the exception of percent-encoding reserved characters). If you want it
resolved, pass the path to a utility function first, and pass the
resolved path to the instance.
Regarding the first, as you note in the issue, phly/http actually has
the second behavior (returning '/' for empty path), but PSR-7 says to
return an empty string. I found with phly/conduit that it was far
easier to assume I have a path, than to need to check for an empty
string. As such, I'm of the mind that we should specify this
normalization as part of the specification, but, as noted on the
issue, I'm unsure if you're recommending that or not.
If you agree, I'll get a PR to make that clarification in place.
> --
> You received this message because you are subscribed to the Google Groups
> "PHP Framework Interoperability Group" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
php-fig+u...@googlegroups.com.
> To post to this group, send email to
php...@googlegroups.com.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/php-fig/bdd21fdc-f99b-438c-bed2-946ce2677c75%40googlegroups.com.
>
> For more options, visit
https://groups.google.com/d/optout.