Ticket #790: cp3_no_content_type2.patch
-
cherrypy/_cprequest.py
old new 685 685 # FieldStorage only recognizes POST, so fake it. 686 686 methenv = {'REQUEST_METHOD': "POST"} 687 687 try: 688 # If the headers are missing "Content-Type" then add one 689 # with an empty ("") value. This ensures that FieldStorage 690 # won't parse the request body for params if the client 691 # didn't provide a "Content-Type" header. 692 # A copy of the headers is passed to FieldStorage so that 693 # we leave the original set unmodified. 694 h = http.HeaderMap(self.headers.items()) 695 h.setdefault('Content-Type', '') 696 688 697 forms = _cpcgifs.FieldStorage(fp=self.rfile, 689 headers= self.headers,698 headers=h, 690 699 environ=methenv, 691 700 keep_blank_values=1) 692 701 except http.MaxSizeExceeded:

