hgweb: strip trailing '/' in apppath before appending '/static/' (issue5943)
Differential Revision: https://phab.mercurial-scm.org/D3978
--- 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 += '/'