diff options
author | Georg Brandl <georg@python.org> | 2008-05-04 21:40:44 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2008-05-04 21:40:44 (GMT) |
commit | 8d66dcd0f44ab1d5786cfa102b6f2deed63f9d2c (patch) | |
tree | 957241d712b70614db386cad63182fd1834a15e8 /Lib | |
parent | 83ea2a92d41209a94bbfa4916fccc1727acdedae (diff) | |
download | cpython-8d66dcd0f44ab1d5786cfa102b6f2deed63f9d2c.zip cpython-8d66dcd0f44ab1d5786cfa102b6f2deed63f9d2c.tar.gz cpython-8d66dcd0f44ab1d5786cfa102b6f2deed63f9d2c.tar.bz2 |
#2695: Do case-insensitive check for algorithms.
Diffstat (limited to 'Lib')
-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 817c5a7..546cea6 100644 --- a/Lib/urllib2.py +++ b/Lib/urllib2.py @@ -976,6 +976,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).hexdigest() |