Replies: 2 comments 2 replies
-
Yeah, this is likely invalid, but my guess is that most frameworks tolerate this. I think it makes sense to expand the query string parser to support this so I will do that. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Thank you for the fast reply! I really would appreciate this expansion! |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
lately I used some software which created weird query strings with a leading ampersand (&).
Example: GET /api/hello?&Arg1=12345&Arg2=67890
These kind of query strings caused a "ValueError" with Microdot:
`Traceback (most recent call last):
File "/lib/microdot_asyncio.py", line 330, in handle_request
File "/lib/microdot_asyncio.py", line 103, in create
File "/lib/microdot.py", line 345, in init
File "/lib/microdot.py", line 403, in _parse_urlencoded
ValueError: need more than 1 values to unpack
`
I'm not sure whether query strings with leading ampersand are valid (I haven't found that it's forbidden, but these RFCs are difficult to read...). Even if it wouldn't be valid, I would like to know whether this error reaction of Microdot is the intended one (as I don't see how to handle this in my application.
Best regards,
Joachim
Beta Was this translation helpful? Give feedback.
All reactions