D2797: hgweb: stop setting headers on wsgirequest
indygreg (Gregory Szorc)
phabricator at mercurial-scm.org
Mon Mar 12 21:34:12 UTC 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG96a93625a824: hgweb: stop setting headers on wsgirequest (authored by indygreg, committed by ).
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D2797?vs=6858&id=6933
REVISION DETAIL
https://phab.mercurial-scm.org/D2797
AFFECTED FILES
mercurial/hgweb/hgweb_mod.py
CHANGE DETAILS
diff --git a/mercurial/hgweb/hgweb_mod.py b/mercurial/hgweb/hgweb_mod.py
--- a/mercurial/hgweb/hgweb_mod.py
+++ b/mercurial/hgweb/hgweb_mod.py
@@ -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__:
To: indygreg, #hg-reviewers, durin42
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list