This was the last consumer of wsgireq.env from our WSGI applications!
(Although indirect consumers of this attribute exist in
wsgirequest.respond().)
| durin42 |
| hg-reviewers |
This was the last consumer of wsgireq.env from our WSGI applications!
(Although indirect consumers of this attribute exist in
wsgirequest.respond().)
| Automatic diff as part of commit; lint not applicable. |
| Automatic diff as part of commit; unit tests not applicable. |
| Path | Packages | |||
|---|---|---|---|---|
| M | mercurial/hgweb/hgwebdir_mod.py (2 lines) |
| try: | try: | ||||
| self.refresh() | self.refresh() | ||||
| csp, nonce = cspvalues(self.ui) | csp, nonce = cspvalues(self.ui) | ||||
| if csp: | if csp: | ||||
| res.headers['Content-Security-Policy'] = csp | res.headers['Content-Security-Policy'] = csp | ||||
| wsgireq.headers.append(('Content-Security-Policy', csp)) | wsgireq.headers.append(('Content-Security-Policy', csp)) | ||||
| virtual = wsgireq.env.get("PATH_INFO", "").strip('/') | virtual = req.dispatchpath.strip('/') | ||||
| tmpl = self.templater(wsgireq, nonce) | tmpl = self.templater(wsgireq, nonce) | ||||
| ctype = tmpl('mimetype', encoding=encoding.encoding) | ctype = tmpl('mimetype', encoding=encoding.encoding) | ||||
| ctype = templater.stringify(ctype) | ctype = templater.stringify(ctype) | ||||
| # Global defaults. These can be overridden by any handler. | # Global defaults. These can be overridden by any handler. | ||||
| res.status = '200 Script output follows' | res.status = '200 Script output follows' | ||||
| res.headers['Content-Type'] = ctype | res.headers['Content-Type'] = ctype | ||||