-
-
Notifications
You must be signed in to change notification settings - Fork 957
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
Don't force query string normalization #1246
Conversation
I would suggest to simply remove the if block (
As the RFC use the word "should" I think you should consider to not apply that policy in order to increase compatibility. |
I don't want to be pedantic (you probably hate me now), but this PR is going to break Example: |
This is what I'm proposing BTW both proposals (this PR and my fork) has a problem with merging
become: Note: apparently that was there even before (if the params are in the URL they're discarded) |
This comment has been minimized.
This comment has been minimized.
Actually I misunderstood you. This is working as expected. If you provide |
#1246 (comment) Well, we gotta sacrifice something! This is an edge case anyway... :P |
Removing I can't see any reason to use |
4724a0d#diff-8eef38c70c64f535c3b8046b5ce40d9eR1067 Using
|
That maybe wrong, but the behavior is even stranger. What's happening on my end is: By removing |
@sindresorhus So the solution seems to be just remove the stress on the |
The last thing that's missing is to remove |
The server may send incorrect URL. If it's already correct, then |
Let's say I request a page that answer with |
https://tools.ietf.org/html/rfc3986#section-2.4
|
While |
Welp. My example is as valid as yours. But |
It assumes that the query speicified in the input is not
URLSearchParams
unless thesearchParams
option is present.The search params are correctly normalized viaThe WHATWG URL handles it, what I need is justdecodeURIComponent
(I spent 30 mins reading stackoverflow and exeprimenting by myself, I'm pretty sure that's the correct one).decodeURI
before parsing thelocation
header.Fixes #1234
Checklist