comparison mercurial/hgweb/hgweb_mod.py @ 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 519b46a8f4d2
children 4167437a45dd
comparison
equal deleted inserted replaced
38744:ae17555ef93f 38745:258d90f69076
134 # determine scheme, port and server name 134 # determine scheme, port and server name
135 # this is needed to create absolute urls 135 # this is needed to create absolute urls
136 logourl = self.config('web', 'logourl') 136 logourl = self.config('web', 'logourl')
137 logoimg = self.config('web', 'logoimg') 137 logoimg = self.config('web', 'logoimg')
138 staticurl = (self.config('web', 'staticurl') 138 staticurl = (self.config('web', 'staticurl')
139 or req.apppath + '/static/') 139 or req.apppath.rstrip('/') + '/static/')
140 if not staticurl.endswith('/'): 140 if not staticurl.endswith('/'):
141 staticurl += '/' 141 staticurl += '/'
142 142
143 # some functions for the templater 143 # some functions for the templater
144 144