Mercurial > hg-stable
changeset 38745:258d90f69076 stable
hgweb: strip trailing '/' in apppath before appending '/static/' (issue5943)
Differential Revision: https://phab.mercurial-scm.org/D3978
author | Cédric Krier <ced@b2ck.com> |
---|---|
date | Wed, 25 Jul 2018 10:05:24 +0200 |
parents | ae17555ef93f |
children | 0f948d821fe7 |
files | mercurial/hgweb/hgweb_mod.py mercurial/hgweb/hgwebdir_mod.py |
diffstat | 2 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/hgweb/hgweb_mod.py Fri Jul 20 09:08:20 2018 +0200 +++ b/mercurial/hgweb/hgweb_mod.py Wed Jul 25 10:05:24 2018 +0200 @@ -136,7 +136,7 @@ logourl = self.config('web', 'logourl') logoimg = self.config('web', 'logoimg') staticurl = (self.config('web', 'staticurl') - or req.apppath + '/static/') + or req.apppath.rstrip('/') + '/static/') if not staticurl.endswith('/'): staticurl += '/'
--- a/mercurial/hgweb/hgwebdir_mod.py Fri Jul 20 09:08:20 2018 +0200 +++ b/mercurial/hgweb/hgwebdir_mod.py Wed Jul 25 10:05:24 2018 +0200 @@ -514,7 +514,7 @@ logourl = config('web', 'logourl') logoimg = config('web', 'logoimg') staticurl = (config('web', 'staticurl') - or req.apppath + '/static/') + or req.apppath.rstrip('/') + '/static/') if not staticurl.endswith('/'): staticurl += '/'