Skip to content
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

Ensure opaque paths always roundtrip #844

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Ensure opaque paths always roundtrip #844

wants to merge 1 commit into from

Conversation

annevk
Copy link
Member

@annevk annevk commented Dec 2, 2024

In fdaa0e5 we tackled a problem whereby removing the fragment or query from a URL with an opaque path through the API would not make the URL roundtrip due to the opaque path being able to end in non-percent-encoded spaces.

However, this failed to address other ways of serializing the URL. As such this is a new approach whereby opaque paths simply cannot end with non-percent-encoded spaces. Enforcing this in the URL parser allows us to completely revert the aforementioned commit, greatly simplifying the API implementation.

Fixes #784.


Due to Interop 2024 this should not be merged until February 2025, but as this seems like the way forward I wanted to put up the fix while it was still fresh in mind. @karwa @hayatoito @valenting review appreciated!

(See WHATWG Working Mode: Changes for more details.)


Preview | Diff

In fdaa0e5 we tackled a problem whereby removing the fragment or query from a URL with an opaque path through the API would not make the URL roundtrip due to the opaque path being able to end in non-percent-encoded spaces.

However, this failed to address other ways of serializing the URL. As such this is a new approach whereby opaque paths simply cannot end with non-percent-encoded spaces. Enforcing this in the URL parser allows us to completely revert the aforementioned commit, greatly simplifying the API implementation.

Fixes #784.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs tests Moving the issue forward requires someone to write tests topic: parser
1 participant