-
-
Notifications
You must be signed in to change notification settings - Fork 21
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
Unquote paths #188
Unquote paths #188
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this! It looks like a rare gnarly issue.
Have you got an example path that you could add into some tests to prevent regressions?
Also, wouldn't unquote(_, encoding="iso-8859-1")
work just as well, and avoid the trip through bytes and back?
I made changes and added tests. |
When you say "not necessary", you mean it isn't strictly required because no URL path needs it? If so, I wouldn't want to make this a switch. Other users won't know what this means. We should just do the right thing every time. For example, gunicorn always decodes the path correctly... |
As I was not able to find a strict answer so I prefered to add this option but you are right, in this case, we need to follow PEP 3333 specifications. |
Thanks! Released in version 2.9.2. |
It seems that there is an issue with path parameters which are not decoded before being passed to the WSGI application.
Looks like it is a common discussion when implementing WSGI adapter: benoitc/gunicorn#1211
In my case I was receiving my path parameter still encoded in my Flask application.
Based on my researches, here is the fix.