diff options
Diffstat (limited to 'Lib/urllib2.py')
-rw-r--r-- | Lib/urllib2.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/urllib2.py b/Lib/urllib2.py index 465aa5e..f87d364 100644 --- a/Lib/urllib2.py +++ b/Lib/urllib2.py @@ -964,6 +964,8 @@ class AbstractDigestAuthHandler: return base def get_algorithm_impls(self, algorithm): + # algorithm should be case-insensitive according to RFC2617 + algorithm = algorithm.upper() # lambdas assume digest modules are imported at the top level if algorithm == 'MD5': H = lambda x: hashlib.md5(x.encode("ascii")).hexdigest() |