Mercurial > hg
changeset 3272:10277edf7e5b
hgweb: fix NWI parsing when hgwebdir isn't at /
author | Brendan Cully <brendan@kublai.com> |
---|---|
date | Thu, 05 Oct 2006 14:45:15 -0700 |
parents | 36fa5db79dd5 |
children | 46188b9528ca |
files | mercurial/hgweb/hgweb_mod.py |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/hgweb/hgweb_mod.py Thu Oct 05 14:27:14 2006 -0700 +++ b/mercurial/hgweb/hgweb_mod.py Thu Oct 05 14:45:15 2006 -0700 @@ -653,11 +653,11 @@ def firstitem(query): return query.split('&', 1)[0].split(';', 1)[0] - base = '' + root = req.env.get('SCRIPT_NAME', '') if req.env.has_key('REPO_NAME'): base = '/' + req.env['REPO_NAME'] - elif req.env.get('SCRIPT_NAME'): - base = req.env['SCRIPT_NAME'] + else: + base = root pi = req.env.get('PATH_INFO') if pi: @@ -681,7 +681,7 @@ base += '?' query = firstitem(req.env['QUERY_STRING']) - return (base, query) + return (root + base, query) req.url, query = spliturl(req)