Patchwork D3346: httppeer: no matter what Python 3 might think, http headers are bytes

login
register
mail settings
Submitter phabricator
Date April 16, 2018, 11:21 p.m.
Message ID <81ec0b926a500cc4182b340e8fb62b4b@localhost.localdomain>
Download mbox | patch
Permalink /patch/31131/
State Not Applicable
Headers show

Comments

phabricator - April 16, 2018, 11:21 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG6cb7e3b91883: httppeer: no matter what Python 3 might think, http headers are bytes (authored by durin42, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D3346?vs=8223&id=8340

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

AFFECTED FILES
  mercurial/httppeer.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/httppeer.py b/mercurial/httppeer.py
--- a/mercurial/httppeer.py
+++ b/mercurial/httppeer.py
@@ -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