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

Lib/urllib2.py

index 5443d0b49f23567a280c18e0f4b84c7e518085d6..a4046d30c237fccf0286459b5f4586f69b39d78d 100644 (file)
@@ -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':