Changeset 1768
- Timestamp:
- 10/26/07 20:44:31
- Files:
-
- trunk/cherrypy/__init__.py (modified) (1 diff)
- trunk/cherrypy/_cprequest.py (modified) (1 diff)
- trunk/cherrypy/test/test_core.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/cherrypy/__init__.py
r1767 r1768 493 493 newurl = '/'.join(atoms) 494 494 495 # At this point, we should have a fully-qualified absolute URL. 496 495 497 if relative: 496 498 old = url().split('/')[:-1] trunk/cherrypy/_cprequest.py
r1767 r1768 326 326 The default 'None' implies that no authentication happened.""" 327 327 328 # Note that cherrypy.url uses "if request.app:" to determine whether 329 # the call is during a real HTTP request or not. So leave this None. 328 330 app = None 329 331 app__doc = \ trunk/cherrypy/test/test_core.py
r1728 r1768 50 50 return "Size: %s" % len(file.file.read()) 51 51 upload.exposed = True 52 53 def baseurl(self, path_info, relative=None): 54 return cherrypy.url(path_info, relative=bool(relative)) 55 baseurl.exposed = True 52 56 53 57 root = Root() … … 1066 1070 self.getPage('/url/?path_info=other/../page1&relative=True') 1067 1071 self.assertBody('page1') 1072 1073 # Output relative to / 1074 self.getPage('/baseurl?path_info=ab&relative=True') 1075 self.assertBody('ab') 1076 # Output relative to / 1077 self.getPage('/baseurl?path_info=/ab&relative=True') 1078 self.assertBody('ab') 1068 1079 1069 1080

