Fix Authorization header value

This commit is contained in:
Marcin Kulik
2017-06-18 12:31:59 +02:00
parent 77189c6ed9
commit 814d7fd22e

View File

@@ -68,7 +68,7 @@ class URLLibHttpAdapter:
if password: if password:
auth = "%s:%s" % (username, password) auth = "%s:%s" % (username, password)
encoded_auth = base64.encodestring(auth.encode('utf-8'))[:-1] encoded_auth = base64.encodestring(auth.encode('utf-8'))[:-1]
headers["Authorization"] = b"Basic %" + encoded_auth headers["Authorization"] = b"Basic " + encoded_auth
request = Request(url, data=body, headers=headers, method="POST") request = Request(url, data=body, headers=headers, method="POST")