Changeset 1516
- Timestamp:
- 12/11/06 13:28:52
- Files:
-
- branches/cherrypy-2.x/cherrypy/_cphttptools.py (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/cherrypy-2.x/cherrypy/_cphttptools.py
r1506 r1516 15 15 class Request(object): 16 16 """An HTTP request.""" 17 18 is_index = None 17 19 18 20 def __init__(self, remoteAddr, remotePort, remoteHost, scheme="http"): … … 296 298 defhandler = getattr(candidate, "default", None) 297 299 if callable(defhandler) and getattr(defhandler, 'exposed', False): 300 # See http://www.cherrypy.org/ticket/613 301 self.is_index = objectpath.endswith("/") 298 302 return defhandler, names[:i+1] + ["default"], names[i+1:-1] 299 303 … … 306 310 # We found the extra ".index". Check if the original path 307 311 # had a trailing slash (otherwise, do a redirect). 312 self.is_index = True 308 313 if not objectpath.endswith('/'): 309 314 atoms = self.browser_url.split("?", 1) … … 312 317 newUrl += "?" + atoms[0] 313 318 raise cherrypy.HTTPRedirect(newUrl) 319 self.is_index = False 314 320 return candidate, names[:i+1], names[i+1:-1] 315 321

