D2849: hgweb: also set Content-Type header
indygreg (Gregory Szorc)
phabricator at mercurial-scm.org
Wed Mar 21 20:58:16 EDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG55e901396005: hgweb: also set Content-Type header (authored by indygreg, committed by ).
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D2849?vs=7197&id=7225
REVISION DETAIL
https://phab.mercurial-scm.org/D2849
AFFECTED FILES
mercurial/hgweb/request.py
CHANGE DETAILS
diff --git a/mercurial/hgweb/request.py b/mercurial/hgweb/request.py
--- a/mercurial/hgweb/request.py
+++ b/mercurial/hgweb/request.py
@@ -298,6 +298,9 @@
if 'CONTENT_LENGTH' in env and 'HTTP_CONTENT_LENGTH' not in env:
headers['Content-Length'] = env['CONTENT_LENGTH']
+ if 'CONTENT_TYPE' in env and 'HTTP_CONTENT_TYPE' not in env:
+ headers['Content-Type'] = env['CONTENT_TYPE']
+
bodyfh = env['wsgi.input']
if 'Content-Length' in headers:
bodyfh = util.cappedreader(bodyfh, int(headers['Content-Length']))
To: indygreg, #hg-reviewers, durin42
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list