From: Johannes Gijsbers Date: Sun, 9 Jan 2005 05:51:49 +0000 (+0000) Subject: Patch #1095362: replace hardcoded test for POST/GET with call to get_method, X-Git-Tag: v2.5a0~2148 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=cdd625a77067e226a5dc715d1892f9511a067391;p=thirdparty%2FPython%2Fcpython.git Patch #1095362: replace hardcoded test for POST/GET with call to get_method, removing some duplication and gaining some flexibility in the process. --- diff --git a/Lib/urllib2.py b/Lib/urllib2.py index 5443d0b49f23..a4046d30c237 100644 --- a/Lib/urllib2.py +++ b/Lib/urllib2.py @@ -859,7 +859,7 @@ class AbstractDigestAuthHandler: entdig = None A1 = "%s:%s:%s" % (user, realm, pw) - A2 = "%s:%s" % (req.has_data() and 'POST' or 'GET', + A2 = "%s:%s" % (req.get_method(), # XXX selector: what about proxies and full urls req.get_selector()) if qop == 'auth':