Patchwork D2854: hgweb: use our forked wsgiheaders module instead of stdlib one

login
register
mail settings
Submitter phabricator
Date April 12, 2018, 4:47 p.m.
Message ID <1310acf4026bcb1625b8a41a29bc5dd2@localhost.localdomain>
Download mbox | patch
Permalink /patch/30815/
State Not Applicable
Headers show

Comments

phabricator - April 12, 2018, 4:47 p.m.
durin42 updated this revision to Diff 8074.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2854?vs=8009&id=8074

REVISION DETAIL
  https://phab.mercurial-scm.org/D2854

AFFECTED FILES
  mercurial/hgweb/request.py

CHANGE DETAILS




To: durin42, #hg-reviewers, indygreg
Cc: indygreg, mercurial-devel

Patch

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 @@ 
         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 @@ 
         self._startresponse = startresponse
 
         self.status = None
+        from . import wsgiheaders # avoid cycle
         self.headers = wsgiheaders.Headers([])
 
         self._bodybytes = None