Changeset 1460
- Timestamp:
- 11/30/06 13:44:34
- Files:
-
- trunk/cherrypy/_cpserver.py (modified) (1 diff)
- trunk/cherrypy/_cpwsgi.py (modified) (6 diffs)
- trunk/cherrypy/lib/wsgiapp.py (modified) (1 diff)
- trunk/cherrypy/test/test.py (modified) (1 diff)
- trunk/cherrypy/test/test_states.py (modified) (2 diffs)
- trunk/cherrypy/wsgiserver.py (moved) (moved from trunk/cherrypy/_cpwsgiserver.py)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/cherrypy/_cpserver.py
r1347 r1460 75 75 if httpserver is None: 76 76 from cherrypy import _cpwsgi 77 httpserver = _cpwsgi. WSGIServer()77 httpserver = _cpwsgi.CPWSGIServer() 78 78 if isinstance(httpserver, basestring): 79 79 httpserver = attributes(httpserver)() trunk/cherrypy/_cpwsgi.py
r1444 r1460 5 5 6 6 import cherrypy as _cherrypy 7 from cherrypy import _cperror, _cpwsgiserver7 from cherrypy import _cperror, wsgiserver 8 8 from cherrypy.lib import http as _http 9 9 … … 237 237 238 238 239 class CPHTTPRequest( _cpwsgiserver.HTTPRequest):239 class CPHTTPRequest(wsgiserver.HTTPRequest): 240 240 241 241 def parse_request(self): … … 245 245 246 246 try: 247 _cpwsgiserver.HTTPRequest.parse_request(self)247 wsgiserver.HTTPRequest.parse_request(self) 248 248 except _http.MaxSizeExceeded: 249 249 self.simple_response("413 Request Entity Too Large") … … 258 258 self.rfile = _http.SizeCheckWrapper(self.rfile, mbs) 259 259 try: 260 return _cpwsgiserver.HTTPRequest.decode_chunked(self)260 return wsgiserver.HTTPRequest.decode_chunked(self) 261 261 except _http.MaxSizeExceeded: 262 262 self.simple_response("413 Request Entity Too Large") … … 265 265 266 266 267 class CPHTTPConnection( _cpwsgiserver.HTTPConnection):267 class CPHTTPConnection(wsgiserver.HTTPConnection): 268 268 269 269 RequestHandlerClass = CPHTTPRequest 270 270 271 271 272 class WSGIServer(_cpwsgiserver.CherryPyWSGIServer):273 274 """Wrapper for _cpwsgiserver.CherryPyWSGIServer.275 276 _cpwsgiserver has been designed to not reference CherryPy in any way,272 class CPWSGIServer(wsgiserver.CherryPyWSGIServer): 273 274 """Wrapper for wsgiserver.CherryPyWSGIServer. 275 276 wsgiserver has been designed to not reference CherryPy in any way, 277 277 so that it can be used in other frameworks and applications. Therefore, 278 278 we wrap it here, so we can set our own mount points from cherrypy.tree. … … 290 290 bind_addr = (server.socket_host, server.socket_port) 291 291 292 s = _cpwsgiserver.CherryPyWSGIServer292 s = wsgiserver.CherryPyWSGIServer 293 293 # We could just pass cherrypy.tree, but by passing tree.apps, 294 294 # we get correct SCRIPT_NAMEs as early as possible. trunk/cherrypy/lib/wsgiapp.py
r1427 r1460 13 13 14 14 def make_environ(): 15 """grabbed some of below from _cpwsgiserver.py15 """grabbed some of below from wsgiserver.py 16 16 17 17 for hosting WSGI apps in non-WSGI environments (yikes!) trunk/cherrypy/test/test.py
r1450 r1460 83 83 84 84 class CommandLineParser(object): 85 available_servers = {'wsgi': "cherrypy._cpwsgi. WSGIServer",85 available_servers = {'wsgi': "cherrypy._cpwsgi.CPWSGIServer", 86 86 'cpmodpy': "cpmodpy", 87 87 'modpygw': "modpygw", trunk/cherrypy/test/test_states.py
r1457 r1460 333 333 print "Testing %s on %s:%s..." % (server, host, port) 334 334 run(server, conf) 335 _run("cherrypy._cpwsgi. WSGIServer")335 _run("cherrypy._cpwsgi.CPWSGIServer") 336 336 337 337 … … 347 347 print "Testing %s on %s:%s..." % (server, host, port) 348 348 run(server, conf) 349 _run("cherrypy._cpwsgi. WSGIServer")349 _run("cherrypy._cpwsgi.CPWSGIServer") 350 350 351 351

