Skip to content

Namespace: explicit parsing errors #455

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

ppkarwasz
Copy link
Contributor

This PR contains the part of #452 that is specific to namespace.

It requires the parser to throw an error if a (percent-encoded) solidus / is encountered in any path segment.

This PR requires the parser to throw an error if a (percent-encoded) solidus `/` is encountered in any path segment.

Signed-off-by: Piotr P. Karwasz <[email protected]>
@ppkarwasz
Copy link
Contributor Author

Does this simplify namespaces? This seems like it only makes namespaces more complicated. Unlike subpaths, namespaces do not care about . or .. segments (and to do so would be a breaking change) so there is no reason to treat %2F and / differently.

Originally posted by @matt-phylum in #452 (comment)

jkowalleck
jkowalleck previously approved these changes Apr 10, 2025
@jkowalleck jkowalleck requested a review from a team April 10, 2025 09:55
@jkowalleck jkowalleck requested a review from a team April 11, 2025 07:24
@jkowalleck jkowalleck added this to the 1.0-draft milestone Apr 11, 2025
Copy link
Member

@johnmhoran johnmhoran left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ppkarwasz I'm not sure if you overlooked replacing "solidus" with "slash" or instead are insistent on using "solidus". I have no linguistic objection to that beautiful Latin-based word, but we don't use it anywhere else in the spec -- it's slashes all the way down -- and RFC 3986 similarly uses "slash" not "solidus". Some famous person somewhere once said something like "a foolish consistency is the hobgoblin of small minds", but imho consistency in the terms we use is a distinct advantage.

What do you think?

@ppkarwasz
Copy link
Contributor Author

I'm not sure if you overlooked replacing "solidus" with "slash" or instead are insistent on using "solidus".

I didn't notice it. Fixed in 9bd2568

Regarding solidus: it is the Unicode name of the character, but I don't really care about the naming as long as it is consistent (which as you pointed out was not).

Copy link
Member

@johnmhoran johnmhoran left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @ppkarwasz -- LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants