Changeset 1223
- Timestamp:
- 08/06/06 17:17:03
- Files:
-
- trunk/cherrypy/_cprequest.py (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/cherrypy/_cprequest.py
r1222 r1223 76 76 process_request_body = True 77 77 body = None 78 body_read = False 78 79 79 80 # Dispatch attributes … … 200 201 self.hooks.run('on_start_resource') 201 202 202 if self.process_request_body :203 if self.process_request_body and not self.body_read: 203 204 # Check path-specific methods_with_bodies. 204 205 meths = self.config.get("methods_with_bodies", ("POST", "PUT")) … … 214 215 if self.process_request_body: 215 216 self.process_body() 216 # Guard against re-reading body on InternalRedirect217 self.process_request_body = False218 217 219 218 self.hooks.run('before_main') … … 362 361 def process_body(self): 363 362 """Convert request.rfile into request.params (or request.body).""" 363 # Guard against re-reading body (e.g. on InternalRedirect) 364 if self.body_read: 365 return 366 self.body_read = True 367 364 368 # FieldStorage only recognizes POST, so fake it. 365 369 methenv = {'REQUEST_METHOD': "POST"}

