Changeset 523
- Timestamp:
- 08/09/05 17:15:36
- Files:
-
- trunk/cherrypy/_cphttptools.py (modified) (1 diff)
- trunk/cherrypy/_cpwsgi.py (modified) (1 diff)
- trunk/cherrypy/_cpwsgiserver.py (modified) (1 diff)
- trunk/cherrypy/test/test_core.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/cherrypy/_cphttptools.py
r522 r523 733 733 else: 734 734 objectPathList = tpath.split('/') 735 if objectPathList == ['global']: 736 objectPathList = ['_global'] 735 737 objectPathList = ['root'] + objectPathList + ['index'] 736 738 trunk/cherrypy/_cpwsgi.py
r498 r523 41 41 42 42 resource = environ.get('SCRIPT_NAME', '') + environ.get('PATH_INFO', '') 43 if not resource.startswith("/"):43 if not (resource == "*" or resource.startswith("/")): 44 44 resource = "/" + resource 45 45 qString = environ.get('QUERY_STRING') trunk/cherrypy/_cpwsgiserver.py
r484 r523 78 78 qs = "" 79 79 self.environ["REQUEST_METHOD"] = method 80 self.environ["SCRIPT_NAME"] = path[1:] 80 if path == "*": 81 self.environ["SCRIPT_NAME"] = path 82 else: 83 self.environ["SCRIPT_NAME"] = path[1:] 81 84 self.environ["PATH_INFO"] = "" 82 85 self.environ["QUERY_STRING"] = qs trunk/cherrypy/test/test_core.py
r522 r523 33 33 34 34 class Root: 35 35 36 def index(self): 36 37 return "hello" 37 38 index.exposed = True 39 40 def _global(self): 41 pass 42 _global.exposed = True 38 43 39 44 cherrypy.root = Root() … … 245 250 246 251 def testConfig(self): 247 self.assertEqual(cherrypy.config.configMap["global"]["luxuryyacht"],248 'throatwobblermangrove')249 250 252 tests = [ 253 ('global', 'luxuryyacht', 'throatwobblermangrove'), 251 254 ('/', 'nex', None ), 252 255 ('/', 'foo', 'this' ), … … 429 432 self.getPage("/method/", method="SEARCH") 430 433 self.assertStatus("501 Not Implemented") 434 435 # Request the OPTIONS method with a Request-URI of "*". 436 self.getPage("*", method="OPTIONS") 437 self.assertStatus("200 OK") 438 # Content-Length header required for OPTIONS with no response body. 439 # See http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.2 440 self.assertHeader("Content-Length", "0") 431 441 432 442 def testFavicon(self):

