From 7eadf1c5c14bb18160ef1751037430278f7ada4e Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 11 Sep 2011 20:29:04 -0600 Subject: [PATCH] ... --- src/cherrypy/lib/httpauth.py | 6 +++--- src/cherrypy/process/servers.py | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/cherrypy/lib/httpauth.py b/src/cherrypy/lib/httpauth.py index 0b4743d668..f5d87d2b43 100644 --- a/src/cherrypy/lib/httpauth.py +++ b/src/cherrypy/lib/httpauth.py @@ -75,7 +75,7 @@ MD5_SESS = "MD5-sess" AUTH = "auth" AUTH_INT = "auth-int" -SUPPORTED_ALGORITHM = ('md5', MD5, MD5_SESS) +SUPPORTED_ALGORITHM = ('md5', MD5, MD5_SESS) # Changed by Kovid SUPPORTED_QOP = (AUTH, AUTH_INT) ################################################################################ @@ -83,7 +83,7 @@ SUPPORTED_QOP = (AUTH, AUTH_INT) # DIGEST_AUTH_ENCODERS = { MD5: lambda val: md5(val).hexdigest(), - 'md5': lambda val:md5(val).hexdigest(), + 'md5': lambda val:md5(val).hexdigest(), # Added by Kovid MD5_SESS: lambda val: md5(val).hexdigest(), # SHA: lambda val: sha(val).hexdigest(), } @@ -225,7 +225,7 @@ def _A1(params, password): algorithm = params.get ("algorithm", MD5) H = DIGEST_AUTH_ENCODERS[algorithm] - if algorithm in (MD5, 'md5'): + if algorithm in (MD5, 'md5'): # Changed by Kovid # If the "algorithm" directive's value is "MD5" or is # unspecified, then A1 is: # A1 = unq(username-value) ":" unq(realm-value) ":" passwd diff --git a/src/cherrypy/process/servers.py b/src/cherrypy/process/servers.py index 932d28d01f..da469bfad2 100644 --- a/src/cherrypy/process/servers.py +++ b/src/cherrypy/process/servers.py @@ -241,10 +241,10 @@ def wait_for_free_port(host, port): for trial in xrange(50): try: # we are expecting a free port, so reduce the timeout - check_port(host, port, timeout=0.2) + check_port(host, port, timeout=0.2) # Changed by Kovid except IOError: # Give the old server thread time to free the port. - time.sleep(0.2) + time.sleep(0.2) # Changed by Kovid else: return