- changed status to resolved
request.content_type is not set to None for form_encoded data
The documentation shows how to use request.content_type to detect whether the data is available in the django QueryDicts - POST/PUT or in request.data according to the reqyest.content_type.
While it should be set to None, for most form submissions there is a content-type set - application/x-www-form-urlencoded, which results into request.content_type not being set to None.
Attached is a patch that takes care of setting the value to None correctly.
Comments (9)
-
-
- attached urlencoded_content_with_charset.diff
- changed status to open
Hi, sometimes form submissions also put the charset into the request content-type, like:
application/x-www-form-urlencoded; charset=UTF-8
The attached trivial patch takes care of this.
-
Issue
#52was marked as a duplicate of this issue. -
- attached content_type_and_charset.patch
Updated patch which also takes into consideration
#52 -
- attached content_type_and_charset-FIXED.patch
Fixed patch attached...
-
Thanks. I'll import these later today.
-
I also ran into this issue today and came to supply a patch but it appears someone has already beat me to it. :)
-
Bump!
-
- attached content_type_and_charset_again.patch
It seems to me, that this problem still persist. Attached is a patch.
- Log in to comment
Imported, thank you.