Download Install Tutorial Docs FAQ Tools WikiLicense Team IRC Planet Involvement Shop Book

Changeset 1460

Show
Ignore:
Timestamp:
11/30/06 13:44:34
Author:
fumanchu
Message:

Renamed _cpwsgiserver.py to wsgiserver.py, to make it more clear that it's a public, reusable module. Also renamed _cpwsgi.WSGIServer to _cpwsgi.CPWSGIServer, to match the naming convention of the other subclasses in that module.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/cherrypy/_cpserver.py

    r1347 r1460  
    7575        if httpserver is None: 
    7676            from cherrypy import _cpwsgi 
    77             httpserver = _cpwsgi.WSGIServer() 
     77            httpserver = _cpwsgi.CPWSGIServer() 
    7878        if isinstance(httpserver, basestring): 
    7979            httpserver = attributes(httpserver)() 
  • trunk/cherrypy/_cpwsgi.py

    r1444 r1460  
    55 
    66import cherrypy as _cherrypy 
    7 from cherrypy import _cperror, _cpwsgiserver 
     7from cherrypy import _cperror, wsgiserver 
    88from cherrypy.lib import http as _http 
    99 
     
    237237 
    238238 
    239 class CPHTTPRequest(_cpwsgiserver.HTTPRequest): 
     239class CPHTTPRequest(wsgiserver.HTTPRequest): 
    240240     
    241241    def parse_request(self): 
     
    245245         
    246246        try: 
    247             _cpwsgiserver.HTTPRequest.parse_request(self) 
     247            wsgiserver.HTTPRequest.parse_request(self) 
    248248        except _http.MaxSizeExceeded: 
    249249            self.simple_response("413 Request Entity Too Large") 
     
    258258            self.rfile = _http.SizeCheckWrapper(self.rfile, mbs) 
    259259        try: 
    260             return _cpwsgiserver.HTTPRequest.decode_chunked(self) 
     260            return wsgiserver.HTTPRequest.decode_chunked(self) 
    261261        except _http.MaxSizeExceeded: 
    262262            self.simple_response("413 Request Entity Too Large") 
     
    265265 
    266266 
    267 class CPHTTPConnection(_cpwsgiserver.HTTPConnection): 
     267class CPHTTPConnection(wsgiserver.HTTPConnection): 
    268268     
    269269    RequestHandlerClass = CPHTTPRequest 
    270270 
    271271 
    272 class WSGIServer(_cpwsgiserver.CherryPyWSGIServer): 
    273      
    274     """Wrapper for _cpwsgiserver.CherryPyWSGIServer. 
    275      
    276     _cpwsgiserver has been designed to not reference CherryPy in any way, 
     272class CPWSGIServer(wsgiserver.CherryPyWSGIServer): 
     273     
     274    """Wrapper for wsgiserver.CherryPyWSGIServer. 
     275     
     276    wsgiserver has been designed to not reference CherryPy in any way, 
    277277    so that it can be used in other frameworks and applications. Therefore, 
    278278    we wrap it here, so we can set our own mount points from cherrypy.tree. 
     
    290290            bind_addr = (server.socket_host, server.socket_port) 
    291291         
    292         s = _cpwsgiserver.CherryPyWSGIServer 
     292        s = wsgiserver.CherryPyWSGIServer 
    293293        # We could just pass cherrypy.tree, but by passing tree.apps, 
    294294        # we get correct SCRIPT_NAMEs as early as possible. 
  • trunk/cherrypy/lib/wsgiapp.py

    r1427 r1460  
    1313 
    1414def make_environ(): 
    15     """grabbed some of below from _cpwsgiserver.py 
     15    """grabbed some of below from wsgiserver.py 
    1616     
    1717    for hosting WSGI apps in non-WSGI environments (yikes!) 
  • trunk/cherrypy/test/test.py

    r1450 r1460  
    8383 
    8484class CommandLineParser(object): 
    85     available_servers = {'wsgi': "cherrypy._cpwsgi.WSGIServer", 
     85    available_servers = {'wsgi': "cherrypy._cpwsgi.CPWSGIServer", 
    8686                         'cpmodpy': "cpmodpy", 
    8787                         'modpygw': "modpygw", 
  • trunk/cherrypy/test/test_states.py

    r1457 r1460  
    333333        print "Testing %s on %s:%s..." % (server, host, port) 
    334334        run(server, conf) 
    335     _run("cherrypy._cpwsgi.WSGIServer") 
     335    _run("cherrypy._cpwsgi.CPWSGIServer") 
    336336 
    337337 
     
    347347            print "Testing %s on %s:%s..." % (server, host, port) 
    348348            run(server, conf) 
    349         _run("cherrypy._cpwsgi.WSGIServer") 
     349        _run("cherrypy._cpwsgi.CPWSGIServer") 
    350350 
    351351 

Hosted by WebFaction

Log in as guest/cpguest to create tickets