Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1)

Unified Diff: Lib/urllib2.py

Issue 4683: urllib2.HTTPDigestAuthHandler fails on third hostname?
Patch Set: Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: urllib2.py
===================================================================
--- urllib2.py (revision 74624)
+++ urllib2.py (working copy)
@@ -893,6 +893,7 @@
self.add_password = self.passwd.add_password
self.retried = 0
self.nonce_count = 0
+ self.last_nonce = None
def reset_retry_count(self):
self.retried = 0
@@ -967,7 +968,11 @@
# XXX selector: what about proxies and full urls
req.get_selector())
if qop == 'auth':
- self.nonce_count += 1
+ if nonce == self.last_nonce:
+ self.nonce_count += 1
+ else:
+ self.nonce_count = 1
+ self.last_nonce = nonce
ncvalue = '%08x' % self.nonce_count
cnonce = self.get_cnonce(nonce)
noncebit = "%s:%s:%s:%s:%s" % (nonce, ncvalue, cnonce, qop, H(A2))
« no previous file with comments | « no previous file | no next file » | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+