summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/ref/request-response.txt10
-rw-r--r--docs/releases/1.5.txt12
2 files changed, 20 insertions, 2 deletions
diff --git a/docs/ref/request-response.txt b/docs/ref/request-response.txt
index 0a337eba42..d7266f0aff 100644
--- a/docs/ref/request-response.txt
+++ b/docs/ref/request-response.txt
@@ -92,8 +92,14 @@ All attributes should be considered read-only, unless stated otherwise below.
.. attribute:: HttpRequest.POST
- A dictionary-like object containing all given HTTP POST parameters. See the
- :class:`QueryDict` documentation below.
+ A dictionary-like object containing all given HTTP POST parameters,
+ providing that the request contains form data. See the
+ :class:`QueryDict` documentation below. If you need to access raw or
+ non-form data posted in the request, access this through the
+ :attr:`HttpRequest.body` attribute instead.
+
+ .. versionchanged:: 1.5
+ Before Django 1.5, HttpRequest.POST contained non-form data.
It's possible that a request can come in via POST with an empty ``POST``
dictionary -- if, say, a form is requested via the POST HTTP method but
diff --git a/docs/releases/1.5.txt b/docs/releases/1.5.txt
index d49bae801d..d30bd5ff7e 100644
--- a/docs/releases/1.5.txt
+++ b/docs/releases/1.5.txt
@@ -245,6 +245,18 @@ For consistency with the design of the other generic views,
dictionary into the context, instead passing the variables from the URLconf
directly into the context.
+Non-form data in HTTP requests
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+:attr:`request.POST <django.http.HttpRequest.POST>` will no longer include data
+posted via HTTP requests with non form-specific content-types in the header.
+In prior versions, data posted with content-types other than
+``multipart/form-data`` or ``application/x-www-form-urlencoded`` would still
+end up represented in the :attr:`request.POST <django.http.HttpRequest.POST>`
+attribute. Developers wishing to access the raw POST data for these cases,
+should use the :attr:`request.body <django.http.HttpRequest.body>` attribute
+instead.
+
OPTIONS, PUT and DELETE requests in the test client
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~