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 parsing special parameters #5494

Closed
liangxiaojian0210 opened this issue Jun 3, 2024 · 1 comment
Closed

request parsing special parameters #5494

liangxiaojian0210 opened this issue Jun 3, 2024 · 1 comment

Comments

@liangxiaojian0210
Copy link

I want to know when i send "http://127.0.0.1:5000/?name=xiaojiann+&age=16" , why request.query_string can get b'name=xiaojiann+' but request.arg get ImmutableMultiDict([('name', 'xiaojiann ')]), request.args use blank space replace +

image

I try flask version 2.0.3 , 3.0.3 and python version 3.6 , 3.10

@davidism
Copy link
Member

davidism commented Jun 3, 2024

Because that's how query string parsing works. You need to percent encode characters with special meanings.

@davidism davidism closed this as not planned Won't fix, can't repro, duplicate, stale Jun 3, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants