diff -ur mercurial-1.4.1.orig/mercurial/hgweb/hgwebdir_mod.py mercurial-1.4.1/mercurial/hgweb/hgwebdir_mod.py --- mercurial-1.4.1.orig/mercurial/hgweb/hgwebdir_mod.py 2009-12-02 03:30:45.000000000 +0200 +++ mercurial-1.4.1/mercurial/hgweb/hgwebdir_mod.py 2010-03-06 21:40:34.000000000 +0200 @@ -227,7 +227,7 @@ parts = [name] if 'PATH_INFO' in req.env: parts.insert(0, req.env['PATH_INFO'].rstrip('/')) - if req.env['SCRIPT_NAME']: + if 'SCRIPT_NAME' in req.env: parts.insert(0, req.env['SCRIPT_NAME']) m = re.match('((?:https?://)?)(.*)', '/'.join(parts)) # squish repeated slashes out of the path component