Changeset 1128
- Timestamp:
- 06/08/06 00:50:48
- Files:
-
- trunk/cherrypy/_cperror.py (modified) (1 diff)
- trunk/cherrypy/test/test_core.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/cherrypy/_cperror.py
r1125 r1128 31 31 import cherrypy 32 32 request = cherrypy.request 33 34 # Note that urljoin will "do the right thing" whether url is: 35 # 1. a URL relative to root (e.g. "/dummy") 36 # 2. a URL relative to the current path 37 # Note that any querystring will be discarded. 38 path = urlparse.urljoin(cherrypy.request.path_info, path) 33 39 34 40 # Set a 'path' member attribute so that code which traps this trunk/cherrypy/test/test_core.py
r1122 r1128 144 144 def index(self): 145 145 raise cherrypy.InternalRedirect("/") 146 147 def relative(self): 148 raise cherrypy.InternalRedirect("cousin") 149 150 def cousin(self): 151 return "I am a redirected page." 146 152 147 153 def petshop(self, user_id): … … 549 555 self.getPage("/internalredirect/secure") 550 556 self.assertBody('Please log in') 557 self.assertStatus(200) 558 559 # Relative path in InternalRedirect 560 self.getPage("/internalredirect/relative") 561 self.assertBody('I am a redirected page.') 551 562 self.assertStatus(200) 552 563

