A test should be added to demonstrate
[https://docs.djangoproject.com/en/dev/ref/request-
response/#django.http.HttpRequest.encoding the documented behavior]:
You can write to `HttpRequest.encoding` to change the encoding used when
accessing the form data. Any subsequent attribute accesses (such as
reading from GET or POST) will use the new encoding value.
The test might look similar the following test, but should use a value
that appears differently after the encoding changes:
https://code.djangoproject.com/attachment/ticket/27107/27107-test.diff
--
Ticket URL: <https://code.djangoproject.com/ticket/27113>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* owner: nobody => PREM1980
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/27113#comment:1>
* has_patch: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/27113#comment:2>
Comment (by PREM1980):
https://github.com/django/django/pull/7179
--
Ticket URL: <https://code.djangoproject.com/ticket/27113#comment:3>
* needs_better_patch: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/27113#comment:4>
Comment (by PREM1980):
Replying to [comment:4 timgraham]:
Fixed all the issues and included test for POST request. As mentioned
earlier, GET as a different problem and will open a different ticket to
track it.
https://github.com/django/django/pull/7185
--
Ticket URL: <https://code.djangoproject.com/ticket/27113#comment:5>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"c41fd66f774b0d67876d3d22beeb783ab5bfa442" c41fd66f]:
{{{
#!CommitTicketReference repository=""
revision="c41fd66f774b0d67876d3d22beeb783ab5bfa442"
Fixed #27113 -- Tested that setting HttpRequest.encoding clears POST.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/27113#comment:6>
Comment (by timgraham):
I created #27156 for the follow up ticket.
--
Ticket URL: <https://code.djangoproject.com/ticket/27113#comment:7>