[issue979407] urllib2 digest auth totally broken

Senko Rasic report at bugs.python.org
Sat Jul 6 15:13:46 CEST 2013


Senko Rasic added the comment:

Checked with 3.4.0 alpha, works fine. Apart from the tests mentioned, I used the following script to check digest auth:

    from urllib import request

    url = 'http://httpbin.org/digest-auth/auth/user/passwd'
    req = request.Request(url)

    password_manager = request.HTTPPasswordMgrWithDefaultRealm()
    password_manager.add_password(None, url, 'user', 'passwd')

    auth_manager = request.HTTPDigestAuthHandler(password_manager)
    opener = request.build_opener(auth_manager)

    request.install_opener(opener)
    handler = request.urlopen(req)

    assert handler.getcode() == 200

----------
nosy: +senko

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


More information about the Python-bugs-list mailing list