D2797: hgweb: stop setting headers on wsgirequest
indygreg (Gregory Szorc)
phabricator at mercurial-scm.org
Sun Mar 11 05:24:54 UTC 2018
indygreg created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
REVISION SUMMARY
All commands now go through the new response API. This is dead code.
REPOSITORY
rHG Mercurial
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
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list