Changeset 1486
- Timestamp:
- 12/09/06 13:21:38
- Files:
-
- branches/cherrypy-2.x/cherrypy/_cpengine.py (modified) (1 diff)
- branches/cherrypy-2.x/cherrypy/_cphttptools.py (modified) (1 diff)
- branches/cherrypy-2.x/cherrypy/_cpwsgi.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/cherrypy-2.x/cherrypy/_cpengine.py
r989 r1486 62 62 and conf('session.storage_type') == 'file'): 63 63 cherrypy._sessionFileLock = threading.RLock() 64 65 # set cgi.maxlen which will limit the size of POST request bodies66 cgi.maxlen = conf('server.max_request_size')67 64 68 65 # Set up the profiler if requested. branches/cherrypy-2.x/cherrypy/_cphttptools.py
r1210 r1486 96 96 applyFilters('before_request_body') 97 97 if self.processRequestBody: 98 # Prepare the SizeCheckWrapper for the request body 99 mbs = int(cherrypy.config.get('server.max_request_body_size', 100 100 * 1024 * 1024)) 101 if mbs > 0: 102 self.rfile = httptools.SizeCheckWrapper(self.rfile, mbs) 103 98 104 self.processBody() 99 105 branches/cherrypy-2.x/cherrypy/_cpwsgi.py
r1483 r1486 159 159 path = "global" 160 160 161 # Prepare the SizeCheckWrapper for the request body162 mbs = int(cherrypy.config.get('server.max_request_body_size',163 100 * 1024 * 1024, path=path))164 161 if isinstance(self.rfile, httptools.SizeCheckWrapper): 165 if mbs > 0: 166 self.rfile.bytes_read = 0 167 self.rfile.maxlen = mbs 168 else: 169 # Unwrap the rfile 170 self.rfile = self.rfile.rfile 171 else: 172 if mbs > 0: 173 self.rfile = httptools.SizeCheckWrapper(self.rfile, mbs) 162 # Unwrap the rfile 163 self.rfile = self.rfile.rfile 174 164 self.environ["wsgi.input"] = self.rfile 175 165

