Skip to content
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 ignores blank values #388

Closed
fangpenlin opened this issue Jun 1, 2015 · 5 comments
Closed

request.GET ignores blank values #388

fangpenlin opened this issue Jun 1, 2015 · 5 comments
Labels

Comments

@fangpenlin
Copy link

When you pass blank query value like

foo=

then request.GET will be empty instead of having {'foo': ''}

@fangpenlin
Copy link
Author

should pass keep_blank_values=True for parse_qsl

https://github.com/KeepSafe/aiohttp/blob/master/aiohttp/web_reqrep.py#L184

@asvetlov
Copy link
Member

asvetlov commented Jun 1, 2015

  1. There is impossible to pass parameter to .GET property.
  2. keep_blank_values=False is reasonable default.
  3. There is request.query_string request's property which allow to manually parse query string preserving blank values.

As result I suggest to close the issue as wontfix.

@fangpenlin
Copy link
Author

@asvetlov I am okay with this, but is it possible to assign a custom request class while creating application? so that I can inherit the request class, define my own stuff, including a override GET with blank values.

@asvetlov
Copy link
Member

asvetlov commented Jun 1, 2015

@victorlin I don't want to allow web.Request customization. At least for now.

  1. I don't see strong reasons for that.
  2. The constructor parameters are not part of public API now, and they are changed very quickly between releases. I don't want to publish those unstable API parts.

@lock
Copy link

lock bot commented Oct 29, 2019

This thread has been automatically locked since there has not been
any recent activity after it was closed. Please open a new issue for
related bugs.

If you feel like there's important points made in this discussion,
please include those exceprts into that new issue.

@lock lock bot added the outdated label Oct 29, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants