SVN: r25522 - trunk/quixote
Neil Schemenauer <nascheme-fVcApmY9cLvQ3/1i3zOLAti2O/[email protected]> Thu, 4 Nov 2004 13:17:10 -0500
| Newsgroups | gmane.comp.web.quixote.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: nascheme
Date: 2004-11-04 13:16:54 -0500 (Thu, 04 Nov 2004)
New Revision: 25522
Modified:
trunk/quixote/publish.py
Log:
Don't have PATH_INFO default to '/'. That leads to confusion.
Modified: trunk/quixote/publish.py
===================================================================
--- trunk/quixote/publish.py 2004-11-04 18:16:18 UTC (rev 25521)
+++ trunk/quixote/publish.py 2004-11-04 18:16:54 UTC (rev 25522)
@@ -254,12 +254,12 @@
Exceptions are handled by the caller.
"""
self.start_request()
- path = request.get_environ('PATH_INFO', '/')
+ path = request.get_environ('PATH_INFO', '')
+ if path[:1] != '/':
+ raise TrailingSlashError("PATH_INFO does not start with /")
# split path into components
if '//' in path:
path = self._SLASH_PAT.sub("/", path)
- if path[:1] != '/':
- raise TrailingSlashError("path does not start with /")
path = path[1:].split('/')
output = self.root_directory._q_traverse(path)
# The callable ran OK, commit any changes to the session