httppeer: no matter what Python 3 might think, http headers are bytes
authorAugie Fackler <augie@google.com>
Fri, 13 Apr 2018 21:07:18 -0400
changeset 37737 6cb7e3b91883
parent 37736 e10b695b9c41
child 37738 a1f785148097
httppeer: no matter what Python 3 might think, http headers are bytes Differential Revision: https://phab.mercurial-scm.org/D3346
mercurial/httppeer.py
--- a/mercurial/httppeer.py	Fri Apr 13 21:06:50 2018 -0400
+++ b/mercurial/httppeer.py	Fri Apr 13 21:07:18 2018 -0400
@@ -278,6 +278,8 @@
         hgargssize = None
 
         for header, value in sorted(req.header_items()):
+            header = pycompat.bytesurl(header)
+            value = pycompat.bytesurl(value)
             if header.startswith('X-hgarg-'):
                 if hgargssize is None:
                     hgargssize = 0