Changeset 1970
- Timestamp:
- 05/25/08 15:02:04
- Files:
-
- trunk/cherrypy/_cprequest.py (modified) (1 diff)
- trunk/cherrypy/lib/http.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/cherrypy/_cprequest.py
r1949 r1970 701 701 raise cherrypy.HTTPError(411) 702 702 703 # FieldStorage only recognizes POST, so fake it. 704 methenv = {'REQUEST_METHOD': "POST"} 703 # If the headers are missing "Content-Type" then add one 704 # with an empty value. This ensures that FieldStorage 705 # won't parse the request body for params if the client 706 # didn't provide a "Content-Type" header. 707 if 'Content-Type' not in self.headers: 708 h = http.HeaderMap(self.headers.items()) 709 h['Content-Type'] = '' 710 else: 711 h = self.headers 712 705 713 try: 706 # If the headers are missing "Content-Type" then add one707 # with an empty value. This ensures that FieldStorage708 # won't parse the request body for params if the client709 # didn't provide a "Content-Type" header.710 if 'Content-Type' not in self.headers:711 h = http.HeaderMap(self.headers.items())712 h['Content-Type'] = ''713 else:714 h = self.headers715 716 714 forms = _cpcgifs.FieldStorage(fp=self.rfile, 717 715 headers=h, 718 environ=methenv, 716 # FieldStorage only recognizes POST. 717 environ={'REQUEST_METHOD': "POST"}, 719 718 keep_blank_values=1) 720 719 except http.MaxSizeExceeded: trunk/cherrypy/lib/http.py
r1967 r1970 378 378 379 379 380 from cherrypy.wsgiserver import SizeCheckWrapper,MaxSizeExceeded380 from cherrypy.wsgiserver import MaxSizeExceeded 381 381 382 382

