#16692 closed Bug (worksforme)
There should be documentation that cautions about using request.raw_post_data and request.POST together
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | Documentation | Version: | 1.3 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | yes | UI/UX: | no |
Description
Currently, if you're accessing request.raw_post_data, then request.POST will become empty; there should be a note in the docs about that and telling that if you need to access both, then you should access request.POST first then request.raw_post_data.
Either that, or this bug should be fixed and it should be safe to read request.raw_post_data and request.POST in any order.
Change History (2)
comment:1 by , 13 years ago
Resolution: | → worksforme |
---|---|
Status: | new → closed |
comment:2 by , 13 years ago
This issue exists in django-1.3, sorry for not noticing that this is already fixed in #15679.
Note:
See TracTickets
for help on using tickets.
I'm sorry, but I'm unable to confirm this bug. Could you provide some evidence that it exists?
There are several test cases in the test suite that guarantee that it's possible to read
request.POST
after accessingrequest.raw_post_data
:https://code.djangoproject.com/browser/django/trunk/tests/regressiontests/requests/tests.py#L279
I attempted to reproduce the issue anyway.
I wrote this view:
Here is the result: