mercurial/hgweb/hgwebdir_mod.py
changeset 6460 a63aed912e54
parent 6391 a1007f7b9b7b
parent 6459 8189e03adb44
child 6762 f67d1468ac50
--- a/mercurial/hgweb/hgwebdir_mod.py	Thu Apr 03 11:18:43 2008 +0200
+++ b/mercurial/hgweb/hgwebdir_mod.py	Thu Apr 03 13:21:42 2008 +0200
@@ -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("//", "/")) + '/'