##// END OF EJS Templates
hgweb: update _runwsgi try/except range to be valid...
marmoute -
r52189:3972d090 default
parent child Browse files
Show More
@@ -410,15 +410,15 b' class hgwebdir:'
410 gc.collect(generation=1)
410 gc.collect(generation=1)
411
411
412 def _runwsgi(self, req, res):
412 def _runwsgi(self, req, res):
413 try:
413 self.refresh()
414 self.refresh()
415
414
416 csp, nonce = cspvalues(self.ui)
415 csp, nonce = cspvalues(self.ui)
417 if csp:
416 if csp:
418 res.headers[b'Content-Security-Policy'] = csp
417 res.headers[b'Content-Security-Policy'] = csp
419
418
420 virtual = req.dispatchpath.strip(b'/')
419 virtual = req.dispatchpath.strip(b'/')
421 tmpl = self.templater(req, nonce)
420 tmpl = self.templater(req, nonce)
421 try:
422 ctype = tmpl.render(b'mimetype', {b'encoding': encoding.encoding})
422 ctype = tmpl.render(b'mimetype', {b'encoding': encoding.encoding})
423
423
424 # Global defaults. These can be overridden by any handler.
424 # Global defaults. These can be overridden by any handler.
General Comments 0
You need to be logged in to leave comments. Login now