def __call__(self, environ, start_response):
        """Pre-initialize WSGI env and call WSGI-callable."""
        # If you're calling this, then you're probably setting SCRIPT_NAME
        # to '' (some WSGI servers always set SCRIPT_NAME to '').
        # Try to look up the app using the full path.
        env1x = environ
        path = httputil.urljoin(
            env1x.get('SCRIPT_NAME', ''),
            env1x.get('PATH_INFO', ''),
        )
        sn = self.script_name(path or '/')
        if sn is None:
            start_response('404 Not Found', [])
            return []

        app = self.apps[sn]

        # Correct the SCRIPT_NAME and PATH_INFO environ entries.
        environ = environ.copy()
        environ['SCRIPT_NAME'] = sn
        environ['PATH_INFO'] = path[len(sn.rstrip('/')) :]
        return app(environ, start_response)
Pre-initialize WSGI env and call WSGI-callable.
cherrypy/_cptree.py