comparison mercurial/hgweb/hgwebdir_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 877185de62cf
children 4167437a45dd
comparison
equal deleted inserted replaced
38744:ae17555ef93f 38745:258d90f69076
512 512
513 sessionvars = webutil.sessionvars(vars, r'?') 513 sessionvars = webutil.sessionvars(vars, r'?')
514 logourl = config('web', 'logourl') 514 logourl = config('web', 'logourl')
515 logoimg = config('web', 'logoimg') 515 logoimg = config('web', 'logoimg')
516 staticurl = (config('web', 'staticurl') 516 staticurl = (config('web', 'staticurl')
517 or req.apppath + '/static/') 517 or req.apppath.rstrip('/') + '/static/')
518 if not staticurl.endswith('/'): 518 if not staticurl.endswith('/'):
519 staticurl += '/' 519 staticurl += '/'
520 520
521 defaults = { 521 defaults = {
522 "encoding": encoding.encoding, 522 "encoding": encoding.encoding,