# HG changeset patch # User Gregory Szorc # Date 1520737738 28800 # Node ID 96a93625a824df1c50b5ca0883c68bb2fb1a7f88 # Parent 67fb0dca29bc9c27e12f3c79e036f614aaa85979 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 diff -r 67fb0dca29bc -r 96a93625a824 mercurial/hgweb/hgweb_mod.py --- 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__: