]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Backport patch #1095362: replace hardcoded test for POST/GET with call to
authorJohannes Gijsbers <jlg@dds.nl>
Sun, 9 Jan 2005 05:53:27 +0000 (05:53 +0000)
committerJohannes Gijsbers <jlg@dds.nl>
Sun, 9 Jan 2005 05:53:27 +0000 (05:53 +0000)
get_method, removing some duplication and gaining some flexibility in the
process.

Lib/urllib2.py

index 644b3802d067fbb3ab17306eb5076165978c1515..3c777cdec7f0891c5924422ed3f530a4209538eb 100644 (file)
@@ -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':