Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign up`last_request.querystring` converting escaped pluses to spaces #240
Comments
|
I have found the root of the problem. It looks like our second phase of parsing is re-unescaping and replacing pluses with spaces: https://github.com/gabrielfalcao/HTTPretty/blob/0.8.3/httpretty/core.py#L192-L193 |
|
I have run out of time and will no longer be submitting a PR. I got as far as swapping https://github.com/gabrielfalcao/HTTPretty/blob/0.8.3/httpretty/compat.py#L64-L69 |
|
Hey, was any solution found for this? I am having the same problem. |
|
I no longer have access to the repo but I'm guessing we either:
|
|
@twolfson I am guessing the fix is not yet merged. Any thoughts on the workaround for this? |
|
No PR fix was submitted due to running out of time. Sorry, I should have clarified by no longer having access to the repo, I meant I don't recall the workaround and can't look it up due to not having access to the repo =/ The guesses above are the best I've got |
|
triaging this ticket, will work on it after next release 1.0.0 |
We are using HTTPretty for testing requests that carry along email addresses. Sometimes email addresses have
+'sin them which are escaped to%2B. When they are being reversed for assertion in HTTPretty, it seems to be unescaping too many times inquerystring(leading to a).I have created a proof of concept to reproduce the issue:
https://gist.github.com/twolfson/9950fbeb31fc4f3ac33f
I will be attempting to follow up with a PR to remedy the issue fully.