-
Notifications
You must be signed in to change notification settings - Fork 193
Namespace/subpath: simplify parsing #452
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
Conversation
This PR: - Uniformizes the treatment of `namespace` and `subpath`: all segments that are empty or equal to one of `.` or `..` should be discarded. - Moves the check for `.` and `..` segments after UTF-8 decoding. This ensures that overlong encoding of `.` (like `%C0%AE`, `%E0%80%AE`, `%F0%80%80%AE`) are also discarded. - Requires the parser to throw an error if an (percent-encoded) solidus `/` is encountered in any path segment. Signed-off-by: Piotr P. Karwasz <[email protected]>
Does this simplify namespaces? This seems like it only makes namespaces more complicated. Unlike subpaths, namespaces do not care about |
Seams about right. Anyway, @ppkarwasz, could you close this particular PR and split it intwo two separate ones, one for each of the scopes? These two PRs could then be worked on independently in their own pace. |
Co-authored-by: Jan Kowalleck <[email protected]>
I am closing this, since I split it as suggested into: |
This PR:
namespace
andsubpath
: all segments that are empty or equal to one of.
or..
should be discarded..
and..
segments after UTF-8 decoding. This ensures that overlong encoding of.
(like%C0%AE
,%E0%80%AE
,%F0%80%80%AE
) are also discarded./
is encountered in any path segment.