-
Notifications
You must be signed in to change notification settings - Fork 330
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
form_urlencoded::ByteSerialize
does NOT conform to the URL standard
#927
Comments
kaffarell
changed the title
Apr 30, 2024
form_urlencoded::ByteSerialize
does NOT conform to the URL Standardform_urlencoded::ByteSerialize
does NOT conform to the URL standard
Thanks for the bug request. I'm happy to review a PR for this. |
kaffarell
added a commit
to kaffarell/rust-url
that referenced
this issue
Apr 30, 2024
Previously the space character was exclusively encoded to '+'. This is wrong, as the URL Standard [0] specifies that the default is '%20'. Another function has been introduced as well, which replicates the old behavior and converts spaces to '+'. Notice that this breaks the default behavior and could lead to bugs. [0]: https://url.spec.whatwg.org/#string-percent-encode-after-encoding Fixes: servo#927 Fixes: servo#888 Signed-off-by: Gabriel Goller <[email protected]>
kaffarell
added a commit
to kaffarell/rust-url
that referenced
this issue
Apr 30, 2024
Previously the space character was exclusively encoded to '+'. This is wrong, as the URL Standard [0] specifies that the default is '%20'. Another function has been introduced as well, which replicates the old behavior and converts spaces to '+'. Notice that this breaks the default behavior and could lead to bugs. [0]: https://url.spec.whatwg.org/#string-percent-encode-after-encoding Fixes: servo#927 Fixes: servo#888 Signed-off-by: Gabriel Goller <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As mentioned in the URL Standard here the percent-encode of a bytestream is defined as follows:
On step 5.3.1 the spaceAsPlus parameter is used:
The issue here is that:
Another issue: #888
The text was updated successfully, but these errors were encountered: