-
-
Notifications
You must be signed in to change notification settings - Fork 445
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
Should handle querystrings in case-insensitive manner #96
Comments
I disagree and none of the other querystring implementations do this either. I want to follow x = new URLSearchParams('FOO=1&foo=2');
console.log(Array.from(x.keys()));
//=> ["FOO", "foo"] |
|
I'll disagree with your disagreement. That no other implementations don't do it is a poor argument. This could be made part of the options object passed to the parse function. If you don't want it to be the default, fine but it should be an options. It's obvious that querystring parameters are not case sensitive and any querystring parser should handle them as such. Anyway, I've change my local version to this
|
You never know if a user or some other system is going to provide a querystring parameter in the same case that you expect. There should be an option that allows you to specify case insensitive handling and if this option is on (in fact it should be the default) then all querystring parameters come in as lowercase (properties or key names)
e.g
http;//www.my.website.com/somepage.html?QuerYpaRam1=somevalue
Result
{ queryparam1: somevalue }
The text was updated successfully, but these errors were encountered: