PATH_INFO
Andrea Arcangeli
andrea at qumranet.com
Wed Apr 2 17:18:50 CDT 2008
Hello,
this fixes an exception in my server if I use /hg instead of /hg/.
Signed-off-by: Andrea Arcangeli <andrea at qumranet.com>
diff --git a/mercurial/hgweb/hgwebdir_mod.py b/mercurial/hgweb/hgwebdir_mod.py
--- a/mercurial/hgweb/hgwebdir_mod.py
+++ b/mercurial/hgweb/hgwebdir_mod.py
@@ -181,7 +181,9 @@
if u.configbool("web", "hidden", untrusted=True):
continue
- parts = [req.env['PATH_INFO'].rstrip('/'), name]
+ parts = [ name ]
+ if 'PATH_INFO' in req.env:
+ parts.insert(0, req.env['PATH_INFO'].rstrip('/'))
if req.env['SCRIPT_NAME']:
parts.insert(0, req.env['SCRIPT_NAME'])
url = ('/'.join(parts).replace("//", "/")) + '/'
More information about the Mercurial
mailing list