Changeset 959
- Timestamp:
- 02/07/06 11:33:59
- Files:
-
- trunk/cherrypy/_cphttpserver.py (modified) (1 diff)
- trunk/cherrypy/_cpserver.py (modified) (3 diffs)
- trunk/cherrypy/_cpwsgi.py (modified) (1 diff)
- trunk/cherrypy/_cpwsgiserver.py (modified) (1 diff)
- trunk/cherrypy/test/standalone_test_alt_script_name.py (added)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/cherrypy/_cphttpserver.py
r952 r959 81 81 request.multithread = cherrypy.config.get("server.thread_pool") > 1 82 82 request.multiprocess = False 83 request.wsgi_environ = {}84 83 response = request.run(self.raw_requestline, self._headerlist(), 85 84 self.rfile) trunk/cherrypy/_cpserver.py
r954 r959 8 8 9 9 import cherrypy 10 from cherrypy import _cphttptools, filters 10 from cherrypy import _cphttptools, filters, _cpwsgi 11 11 from cherrypy.lib import autoreload, profiler, cptools 12 12 … … 42 42 self.onStartServerList = [] 43 43 self.onStopThreadList = [] 44 44 45 self.wsgi_app = _cpwsgi.wsgiApp 46 45 47 def start(self, init_only = False, server_class = _missing, **kwargs): 46 48 """Main function. MUST be called from the main thread. … … 154 156 155 157 # Instantiate the server. 156 self.httpserver = self.httpserverclass() 158 if self.httpserverclass == _cpwsgi.WSGIServer: 159 self.httpserver = self.httpserverclass(self.wsgi_app) 160 161 else: 162 self.httpserver = self.httpserverclass() 157 163 158 164 # HTTP servers MUST be started in a new thread, so that the trunk/cherrypy/_cpwsgi.py
r950 r959 149 149 # We prepare the SizeCheckWrapper for the request body 150 150 self.rfile.bytes_read = 0 151 path = self.environ["SCRIPT_NAME"] 151 script_name = self.environ.get('SCRIPT_NAME', '') 152 path_info = self.environ.get('PATH_INFO', '') 153 path = (script_name + path_info) 152 154 if path == "*": 153 155 path = "global" 154 else:155 path = "/" + path156 156 mbs = int(cherrypy.config.get('server.max_request_body_size', 157 157 100 * 1024 * 1024, path=path)) trunk/cherrypy/_cpwsgiserver.py
r928 r959 65 65 qs = "" 66 66 self.environ["REQUEST_METHOD"] = method 67 if path == "*": 68 self.environ["SCRIPT_NAME"] = path 69 else: 70 self.environ["SCRIPT_NAME"] = path[1:] 71 self.environ["PATH_INFO"] = "" 67 self.environ["SCRIPT_NAME"] = "" 68 self.environ["PATH_INFO"] = path 72 69 self.environ["QUERY_STRING"] = qs 73 70 self.environ["SERVER_PROTOCOL"] = version

