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

Fixed #27156 -- Made changing HttpRequest.encoding clear GET. #7569

Merged
merged 3 commits into from
Nov 17, 2016

Conversation

PREM1980
Copy link
Contributor

@PREM1980 PREM1980 commented Nov 16, 2016

@timgraham timgraham changed the title Ticket 27156 Fixed #27156 -- Made changing HttpRequest.encoding clear GET. Nov 16, 2016
@timgraham
Copy link
Member

I'm not sure if my edits are entirely correct but it seems to suffice for testing the issue.

@PREM1980
Copy link
Contributor Author

PREM1980 commented Nov 17, 2016

ok, as long as its fixes the Python2 issue we should be good.

request = WSGIRequest({
'REQUEST_METHOD': 'GET',
'wsgi.input': '',
'QUERY_STRING': b'name=Hello%20G%C3%BCnter' if six.PY2 else 'name=Hello%20G%C3%BCnter'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using str('name=Hello%20G%C3%BCnter') would also work here but using six.PY2 could be a nice reminder to remove the b'...' branch.

@timgraham timgraham merged commit 371adc4 into django:master Nov 17, 2016
@PREM1980 PREM1980 deleted the ticket_27156 branch November 17, 2016 19:54
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.

3 participants