[issue26134] urllib2.HTTPBasicPriorAuthHandler does not work with DigestAuthentication

guesommer report at bugs.python.org
Sat Jan 16 18:39:30 EST 2016


New submission from guesommer:

My first bug reported here, so might not be perfectly following the rules :)

Similar to issue 19494 ("Add urllib2.HTTPBasicPriorAuthHandler for use with APIs that don't return 401 errors") - but related to digest authentication. 

The sending of the auth header at all times works when using basic authentication, but not with digest authentication (verified with wireshark).

IMHO it should be the same behaviour with digest authentication - I think the change needs to applied there as well.

example code to check:
password_mgr = urllib.request.HTTPPasswordMgrWithPriorAuth()
password_mgr.add_password(None , 'http://www.example.org", "supercow","blablabla",is_authenticated=True)
auth_handler = urllib.request.HTTPDigestAuthHandler(password_mgr)
opener = urllib.request.build_opener(auth_handler)
urllib.request.install_opener(opener)

----------
components: Library (Lib)
messages: 258435
nosy: guesommer
priority: normal
severity: normal
status: open
title: urllib2.HTTPBasicPriorAuthHandler does not work with DigestAuthentication
versions: Python 3.5

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue26134>
_______________________________________


More information about the Python-bugs-list mailing list