mercurial/hgweb/hgwebdir_mod.py
changeset 36903 803e0fc0cc9a
parent 36902 e473a032f38a
child 36904 092ab4ba7ee5
equal deleted inserted replaced
36902:e473a032f38a 36903:803e0fc0cc9a
   367             csp, nonce = cspvalues(self.ui)
   367             csp, nonce = cspvalues(self.ui)
   368             if csp:
   368             if csp:
   369                 res.headers['Content-Security-Policy'] = csp
   369                 res.headers['Content-Security-Policy'] = csp
   370                 wsgireq.headers.append(('Content-Security-Policy', csp))
   370                 wsgireq.headers.append(('Content-Security-Policy', csp))
   371 
   371 
   372             virtual = wsgireq.env.get("PATH_INFO", "").strip('/')
   372             virtual = req.dispatchpath.strip('/')
   373             tmpl = self.templater(wsgireq, nonce)
   373             tmpl = self.templater(wsgireq, nonce)
   374             ctype = tmpl('mimetype', encoding=encoding.encoding)
   374             ctype = tmpl('mimetype', encoding=encoding.encoding)
   375             ctype = templater.stringify(ctype)
   375             ctype = templater.stringify(ctype)
   376 
   376 
   377             # Global defaults. These can be overridden by any handler.
   377             # Global defaults. These can be overridden by any handler.