Daniel Diniz <[email protected]> added the comment:
Hmm, notice that AbstractDigestAuthHandler handles retries:
class AbstractDigestAuthHandler:
def __init__(self, passwd=None):
...
self.retried = 0
...
def reset_retry_count(self):
self.retried = 0
def http_error_auth_reqed(self, auth_header, host, req, headers):
authreq = headers.get(auth_header, None)
if self.retried > 5:
# Don't fail endlessly - if we failed once, we'll probably
# fail a second time. Hm. Unless the Password Manager is
# prompting for the information. Crap. This isn't great
# but it's better than the current 'repeat until recursion
# depth exceeded' approach <wink>
raise HTTPError(req.get_full_url(), 401, "digest auth failed",
headers, None)
else:
self.retried += 1
if authreq:
scheme = authreq.split()[0]
if scheme.lower() == 'digest':
return self.retry_http_digest_auth(req, authreq)
The fact that your password manager is queried six times suggests you're
seeing the "if self.retried > 5:" above.
Could you make a local copy of /usr/lib/python2.5/urllib2.py
and add some prints (specially around get_authorization) to see what is
going on?
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue4683>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com