Index: urllib2.py =================================================================== --- urllib2.py (revision 62700) +++ urllib2.py (working copy) @@ -976,6 +976,8 @@ 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()