diff mercurial/hgweb/hgwebdir_mod.py @ 5970:f25070ecf334

hgweb: fixes to make hg serve prefix handling more robust
author Michele Cella <michele.cella@gmail.com>
date Tue, 22 Jan 2008 22:13:29 +0100
parents abe373e16fe6
children 9f1e6ab76069
line wrap: on
line diff
--- a/mercurial/hgweb/hgwebdir_mod.py	Thu Jan 31 14:44:00 2008 -0600
+++ b/mercurial/hgweb/hgwebdir_mod.py	Tue Jan 22 22:13:29 2008 +0100
@@ -172,7 +172,7 @@
                 if u.configbool("web", "hidden", untrusted=True):
                     continue
 
-                parts = [req.env['PATH_INFO'], name]
+                parts = [req.env['PATH_INFO'].strip('/'), name]
                 if req.env['SCRIPT_NAME']:
                     parts.insert(0, req.env['SCRIPT_NAME'])
                 url = ('/'.join(parts).replace("//", "/")) + '/'