-
Notifications
You must be signed in to change notification settings - Fork 3k
modify url matcher to accomodate snake case GET request parameters #337
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
Conversation
Wouldn't it be simpler to just add an |
for case insensitive? I don't follow. |
I assumed, perhaps wrongly, that the dash was the issue, possibly related to the stuff around double-decoding (or not) in the UrlMatcher. |
sorry i'm kinda new to github. am i doing it right here? |
Rather than just allowing dash-separated words, maybe we should just have a more general character class for what's allowed in a parameter name. Once you're going past |
@Broeks Sorry, you're right. My brain replaced 'snake-case' with 'camel-case' for some reason. Anyway, yes, you GitHub'd correctly, good job. 👍 @ksperling I think this sort of answers it: http://stackoverflow.com/questions/2366260/whats-valid-and-whats-not-in-a-uri-query |
@nateabele Its hard to be certain from that SO question, but I don't see
It looks like:
So |
application/x-www-form-urlencoded would probably be the thing to look at... i.e. we're assuming that the search part of the URL is key-value pairs separated by & / =. So any character is allowed as long as it's percent-escaped (or '+' for space). This means a URLMatcher pattern of '...?hi+bob&%20' should define two parameters, To be consistent, we should probably also allow percent-encoding special character in path parameter names. |
I was going to ask about why anything other than = and & would be a problem. If you can squeeze it through the browser then it can be a javascript string and thats whats needed for an associative array, right? |
I'm just gonna merge this for now since the fix is correct (if limited), and we have a release to push. We can come back and broaden it later. |
modify url matcher to accomodate snake case GET request parameters
No description provided.