Fixed #26014 -- Added WSGIRequest content_type and content_params attributes.

Parsed the CONTENT_TYPE header once and recorded it on the request.
This commit is contained in:
Curtis Maloney 2015-08-07 15:51:39 +10:00 committed by Tim Graham
parent dca8b916ff
commit 6f1318734f
5 changed files with 42 additions and 8 deletions

View file

@ -84,6 +84,20 @@ All attributes should be considered read-only, unless stated otherwise.
from ``GET`` or ``POST``) will use the new ``encoding`` value. Useful if
you know the form data is not in the :setting:`DEFAULT_CHARSET` encoding.
.. attribute:: HttpRequest.content_type
.. versionadded:: 1.10
A string representing the MIME type of the request, parsed from the
``CONTENT_TYPE`` header.
.. attribute:: HttpRequest.content_params
.. versionadded:: 1.10
A dictionary of key/value parameters included in the ``CONTENT_TYPE``
header.
.. attribute:: HttpRequest.GET
A dictionary-like object containing all given HTTP GET parameters. See the