changeset 36887:96a93625a824

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
author Gregory Szorc <gregory.szorc@gmail.com>
date Sat, 10 Mar 2018 19:08:58 -0800
parents 67fb0dca29bc
children 66f62d120ba2
files mercurial/hgweb/hgweb_mod.py
diffstat 1 files changed, 0 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- 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__: