#18215: Don't assume POST data is always application/x-www-form-urlencoded
-------------------------------+--------------------
Reporter: slacy | Owner: nobody
Type: New feature | Status: new
Component: HTTP handling | Version: 1.4
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------
It seems as though the code in HttpRequest that takes the raw POST data
and turns it into request.POST (a QueryDict instance) always assumes that
the incoming data is form encoded. In fact, the QueryDict class itself
does the decoding, which seems a bit odd to me.
Many web application frameworks are using JSON (application/javascript or
text/json, usually) encoded POST bodies, and other frameworks will use
(gasp!) XML. Django should look at the request.meta['CONTENT_TYPE'] of
the incoming data, and use the right deterializers. Supported
deserializers should be "form encoded" (the current), json (via
simplejson) and likely XML .
REST frameworks like django-rest-framework and tastypie have better
handling of POST/PUT data than Django itself, irrespective of the
"RESTyness" of the whole thing.
--
Ticket URL: <https://code.djangoproject.com/ticket/18215>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.