D4834: py3: convert HTTP request headers to str
indygreg (Gregory Szorc)
phabricator at mercurial-scm.org
Tue Oct 2 08:46:20 EDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGa5183c6f2270: py3: convert HTTP request headers to str (authored by indygreg, committed by ).
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D4834?vs=11546&id=11553
REVISION DETAIL
https://phab.mercurial-scm.org/D4834
AFFECTED FILES
mercurial/debugcommands.py
CHANGE DETAILS
diff --git a/mercurial/debugcommands.py b/mercurial/debugcommands.py
--- a/mercurial/debugcommands.py
+++ b/mercurial/debugcommands.py
@@ -3286,7 +3286,10 @@
line = line.lstrip()
m = re.match(b'^([a-zA-Z0-9_-]+): (.*)$', line)
if m:
- headers[m.group(1)] = m.group(2)
+ # Headers need to use native strings.
+ key = pycompat.strurl(m.group(1))
+ value = pycompat.strurl(m.group(2))
+ headers[key] = value
continue
if line.startswith(b'BODYFILE '):
To: indygreg, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list