Package cherrypy :: Module _cpwsgi_server
[hide private]
[frames] | no frames]

Source Code for Module cherrypy._cpwsgi_server

 1  """WSGI server interface (see PEP 333). This adds some CP-specific bits to 
 2  the framework-agnostic wsgiserver package. 
 3  """ 
 4   
 5  import cherrypy 
 6  from cherrypy import wsgiserver 
 7   
 8   
9 -class CPHTTPRequest(wsgiserver.HTTPRequest):
10
11 - def __init__(self, sendall, environ, wsgi_app):
16 17
18 -class CPHTTPConnection(wsgiserver.HTTPConnection):
19 20 RequestHandlerClass = CPHTTPRequest
21 22
23 -class CPWSGIServer(wsgiserver.CherryPyWSGIServer):
24 """Wrapper for wsgiserver.CherryPyWSGIServer. 25 26 wsgiserver has been designed to not reference CherryPy in any way, 27 so that it can be used in other frameworks and applications. Therefore, 28 we wrap it here, so we can set our own mount points from cherrypy.tree 29 and apply some attributes from config -> cherrypy.server -> wsgiserver. 30 """ 31 32 ConnectionClass = CPHTTPConnection 33
34 - def __init__(self):
55