Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit cdd625a

Browse files
author
Johannes Gijsbers
committed
Patch #1095362: replace hardcoded test for POST/GET with call to get_method,
removing some duplication and gaining some flexibility in the process.
1 parent 2abe785 commit cdd625a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Lib/urllib2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -859,7 +859,7 @@ def get_authorization(self, req, chal):
859859
entdig = None
860860

861861
A1 = "%s:%s:%s" % (user, realm, pw)
862-
A2 = "%s:%s" % (req.has_data() and 'POST' or 'GET',
862+
A2 = "%s:%s" % (req.get_method(),
863863
# XXX selector: what about proxies and full urls
864864
req.get_selector())
865865
if qop == 'auth':

0 commit comments

Comments
 (0)