Mercurial > hg
comparison mercurial/hgweb/hgwebdir_mod.py @ 15001:dd74cd1e5d49 stable
hgweb: handle 'baseurl' configurations with leading slash (issue2934)
author | wujek |
---|---|
date | Mon, 01 Aug 2011 09:48:10 +0200 |
parents | 924c82157d46 |
children | b55c1c6a793e |
comparison
equal
deleted
inserted
replaced
15000:68b5d7005cca | 15001:dd74cd1e5d49 |
---|---|
366 if self._baseurl is not None: | 366 if self._baseurl is not None: |
367 u = util.url(self._baseurl) | 367 u = util.url(self._baseurl) |
368 env['SERVER_NAME'] = u.host | 368 env['SERVER_NAME'] = u.host |
369 if u.port: | 369 if u.port: |
370 env['SERVER_PORT'] = u.port | 370 env['SERVER_PORT'] = u.port |
371 env['SCRIPT_NAME'] = '/' + u.path | 371 path = u.path or "" |
372 if not path.startswith('/'): | |
373 path = '/' + path | |
374 env['SCRIPT_NAME'] = path |