changeset 36651:6b1eb4c610b4

httpconnection: convert url to bytes in readauthforuri This method is sometimes called by the stdlib, so we just need to accept both bytes and unicodes here. Awesome. Differential Revision: https://phab.mercurial-scm.org/D2598
author Augie Fackler <augie@google.com>
date Sat, 03 Mar 2018 14:24:21 -0500
parents 9318babff83b
children 8381126bf43c
files mercurial/httpconnection.py
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/httpconnection.py	Sat Mar 03 14:44:41 2018 -0500
+++ b/mercurial/httpconnection.py	Sat Mar 03 14:24:21 2018 -0500
@@ -14,6 +14,7 @@
 
 from .i18n import _
 from . import (
+    pycompat,
     util,
 )
 
@@ -62,6 +63,7 @@
 
 # moved here from url.py to avoid a cycle
 def readauthforuri(ui, uri, user):
+    uri = pycompat.bytesurl(uri)
     # Read configuration
     groups = {}
     for key, val in ui.configitems('auth'):