﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
23773	"Client().post(""/someurl"",data="""", content_type='text/plain') results in request.body = {}"	Ian Sparks	nobody	"If you want to access request.body in a handler function to get the raw posted data and the value posted was the empty string """" with a content type of text/plain then what appears in request.body is a string representing an empty dictionary {} due to this line in client.py in the RequestFactory class.

    def post(self, path, data=None, content_type=MULTIPART_CONTENT, secure=False, **extra):
        ""Construct a POST request.""

        post_data = self._encode_data(data or {}, content_type) # <-- Problem line

Here data is replaced with a dictionary before being passed to encoding but what I would expect to end up in request.body is the original empty string for a text/plain request.



"	Bug	new	HTTP handling	1.7	Normal				Unreviewed	0	0	0	0	0	0
