[issue18543] urllib.parse.urlopen shouldn't ignore installed opener when called with any ca* argument

David Ford (FirefighterBlu3) report at bugs.python.org
Fri Jul 3 06:32:31 CEST 2015


David Ford (FirefighterBlu3) added the comment:

Third version of this patch and a short test suite specifically for this problem.

per awareness of :issue:`23166` I rewrote my patch to handle subclassed HTTPS handlers. There are also exceptions raised if an attempt to install more than one HTTPS handler is done. HTTPS does not play well with multiple handlers trying to process data and will immediately fail on a second attempt to negotiate a handshake on an established socket.

Additionally, if (a) an HTTPSHandler is already in the chain and (b) doesn't have an SSL context, then we create an appropriate context and attach it to the existing handler

----------
Added file: http://bugs.python.org/file39848/urllib.request.py-do-not-overwrite-existing-opener.diff

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


More information about the Python-bugs-list mailing list