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

Changeset 1245

Show
Ignore:
Timestamp:
08/15/06 20:19:42
Author:
dowski
Message:

Fixed an issue with wrapping plain WSGI callables and removed some pre-remix code.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/cp3-wsgi-remix/_cprequest.py

    r1244 r1245  
    161161            self.process_headers() 
    162162             
    163             if self.app is None: 
    164                 # Some interfaces (like WSGI) may have already set self.app. 
    165                 # If not, look up the app for this path. 
    166                 self.script_name = r = cherrypy.tree.script_name(self.path) 
    167                 if r is None: 
    168                     raise cherrypy.NotFound() 
    169                 self.app = cherrypy.tree.apps[r] 
    170             else: 
    171                 self.script_name = self.wsgi_environ.get('SCRIPT_NAME', '') 
     163            self.script_name = self.wsgi_environ.get('SCRIPT_NAME', '') 
    172164             
    173165            # path_info should be the path from the 
  • branches/cp3-wsgi-remix/_cptree.py

    r1244 r1245  
    3434        # Handle WSGI callables 
    3535        elif callable(app) and wrap: 
    36             app = HostedWSGI(app
     36            app = Application(HostedWSGI(app), script_name, conf
    3737        # In all other cases leave the app intact (no wrapping) 
    3838         
  • branches/cp3-wsgi-remix/_cpwsgi.py

    r1244 r1245  
    169169                           'tools.wsgiapp.app': app, 
    170170                          } 
    171      
    172     def __call__(self, environ, start_response): 
    173         return self.app(environ, start_response) 
     171 
    174172 
    175173#                            Server components                            # 

Hosted by WebFaction

Log in as guest/cpguest to create tickets