From 1f1b6fee1755772b6ac8d0acffb1f6b0a2cf6b53 Mon Sep 17 00:00:00 2001 From: Dennis Schridde Date: Thu, 25 Apr 2013 11:58:42 +0200 Subject: [PATCH] Fix: Decode auth header, to not encode it as b'...' in the HTTP request --- bitcoinrpc/authproxy.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bitcoinrpc/authproxy.py b/bitcoinrpc/authproxy.py index 00de290..b10b078 100644 --- a/bitcoinrpc/authproxy.py +++ b/bitcoinrpc/authproxy.py @@ -69,7 +69,7 @@ def __init__(self, service_url, service_name=None, timeout=HTTP_TIMEOUT): self.__id_count = 0 authpair = "%s:%s" % (self.__url.username, self.__url.password) authpair = authpair.encode('utf8') - self.__auth_header = "Basic %s" % base64.b64encode(authpair) + self.__auth_header = "Basic %s" % base64.b64encode(authpair).decode('utf8') if self.__url.scheme == 'https': self.__conn = httplib.HTTPSConnection(self.__url.hostname, port, None, None, False,