comparison mercurial/hgweb/hgwebdir_mod.py @ 36908:cd6ae9ab7bd8

hgweb: remove dead wsgirequest code All responses now go through our modern response type. All code related to response handling can be deleted. Differential Revision: https://phab.mercurial-scm.org/D2830
author Gregory Szorc <gregory.szorc@gmail.com>
date Sun, 11 Mar 2018 15:55:38 -0700
parents c1de7efca574
children f0a851542a05
comparison
equal deleted inserted replaced
36907:c1de7efca574 36908:cd6ae9ab7bd8
365 self.refresh() 365 self.refresh()
366 366
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))
371 370
372 virtual = req.dispatchpath.strip('/') 371 virtual = req.dispatchpath.strip('/')
373 tmpl = self.templater(req, nonce) 372 tmpl = self.templater(req, nonce)
374 ctype = tmpl('mimetype', encoding=encoding.encoding) 373 ctype = tmpl('mimetype', encoding=encoding.encoding)
375 ctype = templater.stringify(ctype) 374 ctype = templater.stringify(ctype)