# HG changeset patch # User Augie Fackler # Date 2018-04-11 18:01:37 # Node ID da84e26d85edb755760519c93a708e3737d7c27b # Parent 74e1362585c044d9893e9f91c1a5e20bfd137790 hgweb: use our forked wsgiheaders module instead of stdlib one Now we use bytes for headers, rather than native strings. Differential Revision: https://phab.mercurial-scm.org/D2854 diff --git a/mercurial/hgweb/request.py b/mercurial/hgweb/request.py --- a/mercurial/hgweb/request.py +++ b/mercurial/hgweb/request.py @@ -8,7 +8,6 @@ from __future__ import absolute_import -import wsgiref.headers as wsgiheaders #import wsgiref.validate from ..thirdparty import ( @@ -289,6 +288,7 @@ def parserequestfromenv(env, reponame=No if k.startswith('HTTP_'): headers.append((k[len('HTTP_'):].replace('_', '-'), v)) + from . import wsgiheaders # avoid cycle headers = wsgiheaders.Headers(headers) # This is kind of a lie because the HTTP header wasn't explicitly @@ -378,6 +378,7 @@ class wsgiresponse(object): self._startresponse = startresponse self.status = None + from . import wsgiheaders # avoid cycle self.headers = wsgiheaders.Headers([]) self._bodybytes = None