-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Request.GET drops empty params #436
Comments
See also #388 |
maybe |
Why is We should at least be consistent. Pyramid does return the empty params. See |
I'm inclined to making |
@sk- The use case of empty params for POST is HTML form submission where not all the fields may be filled by user. |
@kxepal I may want to pass empty string for parameter |
The same could be argued then for GET, you can also have forms using get (like search forms). In that case, the value is the empty string If you not allow the case Note also, that the RFC does not specify any format for the query string. It says: In my particular use case I'm not checking for presence in which any value could do the trick. Rather I have a middleware that will log the request only if there's a specific field set (It could be empty). |
Done. |
Currently
Request.GET
drops empty params. That is if the path is/get?foo=&bar
, I won't be able to see eitherfoo
orbar
This could be fixed by adding
keep_blank_valus=True
toparse_qsl
inRequest.GET
, just like it is done forRequest.post
.The text was updated successfully, but these errors were encountered: