hgweb: stop setting headers on wsgirequest
All commands now go through the new response API. This is dead code.
Differential Revision: https://phab.mercurial-scm.org/D2797
--- a/mercurial/hgweb/hgweb_mod.py Sat Mar 10 20:35:35 2018 -0800
+++ b/mercurial/hgweb/hgweb_mod.py Sat Mar 10 19:08:58 2018 -0800
@@ -313,9 +313,6 @@
if rctx.csp:
# hgwebdir may have added CSP header. Since we generate our own,
# replace it.
- wsgireq.headers = [h for h in wsgireq.headers
- if h[0] != 'Content-Security-Policy']
- wsgireq.headers.append(('Content-Security-Policy', rctx.csp))
res.headers['Content-Security-Policy'] = rctx.csp
handled = wireprotoserver.handlewsgirequest(
@@ -393,7 +390,6 @@
res.setbodybytes('')
return res.sendresponse()
- wsgireq.headers.append((r'ETag', pycompat.sysstr(tag)))
res.headers['ETag'] = tag
if cmd not in webcommands.__all__: