Backported to 2.3.
This commit is contained in:
parent
f1f0560832
commit
8b3e871a19
|
@ -696,7 +696,7 @@ class AbstractBasicAuthHandler:
|
||||||
|
|
||||||
def retry_http_basic_auth(self, host, req, realm):
|
def retry_http_basic_auth(self, host, req, realm):
|
||||||
user,pw = self.passwd.find_user_password(realm, host)
|
user,pw = self.passwd.find_user_password(realm, host)
|
||||||
if pw:
|
if pw is not None:
|
||||||
raw = "%s:%s" % (user, pw)
|
raw = "%s:%s" % (user, pw)
|
||||||
auth = 'Basic %s' % base64.encodestring(raw).strip()
|
auth = 'Basic %s' % base64.encodestring(raw).strip()
|
||||||
if req.headers.get(self.auth_header, None) == auth:
|
if req.headers.get(self.auth_header, None) == auth:
|
||||||
|
|
Loading…
Reference in New Issue