From c8dcfb6cece2da41d7b86879af1f4b81f98d70df Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Fri, 13 Feb 2009 10:50:01 +0000 Subject: part of #3613: fix get_host_info() usage of base64.encodestring(). --- Lib/xmlrpc/client.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Lib/xmlrpc/client.py') diff --git a/Lib/xmlrpc/client.py b/Lib/xmlrpc/client.py index e66ee843a1..86988deefa 100644 --- a/Lib/xmlrpc/client.py +++ b/Lib/xmlrpc/client.py @@ -1161,7 +1161,8 @@ class Transport: if auth: import base64 - auth = base64.encodestring(urllib.parse.unquote(auth)) + auth = urllib.parse.unquote_to_bytes(auth) + auth = base64.encodestring(auth).decode("utf-8") auth = "".join(auth.split()) # get rid of whitespace extra_headers = [ ("Authorization", "Basic " + auth) -- cgit v1.2.1