durin42 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  This fixes a lot of hanging tests on Python 3, because
  "Content-Length" was getting sent as "b'Content-Length'" (yes, really)
  and then clients would expect a close-is-end body instead of counting
  off a certain number of bytes.

REPOSITORY
  rHG Mercurial

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

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
@@ -520,8 +520,10 @@
                 if not chunk:
                     break
 
+        strheaders = [(pycompat.strurl(k), pycompat.strurl(v)) for
+                      k, v in self.headers.items()]
         write = self._startresponse(pycompat.sysstr(self.status),
-                                    self.headers.items())
+                                    strheaders)
 
         if self._bodybytes:
             yield self._bodybytes



To: durin42, #hg-reviewers
Cc: mercurial-devel
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to