Mercurial > hg
changeset 15001:dd74cd1e5d49 stable
hgweb: handle 'baseurl' configurations with leading slash (issue2934)
author | wujek |
---|---|
date | Mon, 01 Aug 2011 09:48:10 +0200 |
parents | 68b5d7005cca |
children | b55c1c6a793e d06b9c55ddab |
files | mercurial/hgweb/hgwebdir_mod.py |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/hgweb/hgwebdir_mod.py Mon Aug 01 19:53:00 2011 +0300 +++ b/mercurial/hgweb/hgwebdir_mod.py Mon Aug 01 09:48:10 2011 +0200 @@ -368,4 +368,7 @@ env['SERVER_NAME'] = u.host if u.port: env['SERVER_PORT'] = u.port - env['SCRIPT_NAME'] = '/' + u.path + path = u.path or "" + if not path.startswith('/'): + path = '/' + path + env['SCRIPT_NAME'] = path