changeset 44766:a50f33f1ff24 stable

url: fix a bytes vs str crash in processing proxy headers (issue6249) I have no idea how to make a test for this, so if somebody knows, feel free to add one or follow up on this. The bug reporter reported that it worked for them, so there may not be other hidden issues here. Differential Revision: https://phab.mercurial-scm.org/D8485
author Matt Harbison <matt_harbison@yahoo.com>
date Sun, 26 Apr 2020 14:29:47 -0400
parents 3d5fb6cab832
children 5d309906ed0e
files mercurial/url.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/url.py	Fri Apr 24 20:00:25 2020 +0200
+++ b/mercurial/url.py	Sun Apr 26 14:29:47 2020 -0400
@@ -225,7 +225,7 @@
 
 def _generic_proxytunnel(self):
     proxyheaders = {
-        x: self.headers[x]
+        pycompat.bytestr(x): pycompat.bytestr(self.headers[x])
         for x in self.headers
         if x.lower().startswith('proxy-')
     }