summaryrefslogtreecommitdiffstats
path: root/Lib/xmlrpc
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2009-02-13 10:50:01 (GMT)
committerGeorg Brandl <georg@python.org>2009-02-13 10:50:01 (GMT)
commitc8dcfb6cece2da41d7b86879af1f4b81f98d70df (patch)
treeb3b568eb77b87c263cc5e042435e84c1f6b19681 /Lib/xmlrpc
parent35e2c4e67adee5910819b95297d19285270eb7fe (diff)
downloadcpython-c8dcfb6cece2da41d7b86879af1f4b81f98d70df.zip
cpython-c8dcfb6cece2da41d7b86879af1f4b81f98d70df.tar.gz
cpython-c8dcfb6cece2da41d7b86879af1f4b81f98d70df.tar.bz2
part of #3613: fix get_host_info() usage of base64.encodestring().
Diffstat (limited to 'Lib/xmlrpc')
-rw-r--r--Lib/xmlrpc/client.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/xmlrpc/client.py b/Lib/xmlrpc/client.py
index e66ee84..86988de 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)