Skip to content

Conversation

kevin1024
Copy link
Contributor

Werkzeug's request object has a url method that returns a URL with a
partially-decoded querystring, causing some methods to fail in weird ways with
a message about urlencoding. This patch fixes the problem for me.

I have also added a couple tests for the method in the utils model that
extracts the params from the request object since it was untested. The second
test is the regresssion test that reproduces the bug.

I have also removed a test that I think is incorrect. See my comments on the
commit here:

7102484

@kevin1024
Copy link
Contributor Author

Doh! I have a couple py3 issues, hang on...

Werkzeug's request object has a url method that returns a URL with a
partially-decoded querystring, causing some methods to fail in weird ways with
a message about urlencoding.  This patch fixes the problem for me.

I have also added a couple tests for the method in the utils model that
extracts the params from the request object since it was untested.  The second
test is the regresssion test that reproduces the bug.

I have also removed a test that I think is incorrect.  See my comments on the
commit here:

lepture@7102484
@kevin1024
Copy link
Contributor Author

OK that should fix it. Needed an explicit byte decode on querystring, werkzeug gives it to you as bytes but gives you the url root as a string for some reason.

@lepture
Copy link
Owner

lepture commented Aug 18, 2014

merged in 92cf9eb

@lepture lepture closed this Aug 18, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants