From patchwork Wed Jul 25 12:50:19 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D3978: hgweb: strip trailing '/' in apppath before appending '/static/' From: phabricator X-Patchwork-Id: 32943 Message-Id: <41e1e67c6b38e17a3bbfdb54f0401e3e@localhost.localdomain> To: mercurial-devel@mercurial-scm.org Date: Wed, 25 Jul 2018 12:50:19 +0000 This revision was automatically updated to reflect the committed changes. Closed by commit rHG258d90f69076: hgweb: strip trailing '/' in apppath before appending '/static/' (issue5943) (authored by ced, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D3978?vs=9659&id=9665 REVISION DETAIL https://phab.mercurial-scm.org/D3978 AFFECTED FILES mercurial/hgweb/hgweb_mod.py mercurial/hgweb/hgwebdir_mod.py CHANGE DETAILS To: ced, #hg-reviewers Cc: yuja, mercurial-devel diff --git a/mercurial/hgweb/hgwebdir_mod.py b/mercurial/hgweb/hgwebdir_mod.py --- a/mercurial/hgweb/hgwebdir_mod.py +++ b/mercurial/hgweb/hgwebdir_mod.py @@ -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 += '/' diff --git a/mercurial/hgweb/hgweb_mod.py b/mercurial/hgweb/hgweb_mod.py --- a/mercurial/hgweb/hgweb_mod.py +++ b/mercurial/hgweb/hgweb_mod.py @@ -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 += '/'