From: Johannes Gijsbers Date: Sun, 9 Jan 2005 05:53:27 +0000 (+0000) Subject: Backport patch #1095362: replace hardcoded test for POST/GET with call to X-Git-Tag: v2.4.1c1~90 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f1cea6a6fa7578b06ca4a8a446308b4597a71575;p=thirdparty%2FPython%2Fcpython.git Backport 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 644b3802d067..3c777cdec7f0 100644 --- a/Lib/urllib2.py +++ b/Lib/urllib2.py @@ -856,7 +856,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':