Martin Panter added the comment:

There are two problems with the test case, and one bug in Python:

1. HTTPPasswordMgr doesn’t handle realm=None; it has to be a string. You can 
use HTTPPasswordMgrWithDefaultRealm though.

2. The password managers won’t match a proxy with a non-standard port number 
against a hostname without a port. So you have to include the port in the 
add_password() call.

3. AbstractDigestAuthHandler.get_authorization() is using the wrong URL, as 
Alexander already discovered. I made proxy-digest.patch which should fix this.

The wrong URL (final URL rather than proxy) was actually tested for in 
test_urllib2_localnet.ProxyAuthTests. So I fixed those tests.

----------
keywords: +patch
nosy: +vadmium
stage:  -> patch review
versions: +Python 3.6
Added file: http://bugs.python.org/file39755/proxy-digest.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue16095>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to