Senthil Kumaran added the comment:

I could verify this bug and also looks like a tricky one. Because when we are 
sending the cacert (the second time), we create a new HTTPSHandler and then 
build the opener again using that handler. 

I thought, we can use the existing opener object itself like this - 

-        opener = build_opener(https_handler)
+        if _opener is None:
+            opener = build_opener(https_handler)
+        else:
+            opener = _opener
+            opener.add_handler(https_handler)


But even then the problem is, the existing default HTTPSHandler will be invoked 
before the newly added one, as add_handler does a bisect.insert to add new 
handlers.

Thinking what's the best way to insert this new updated HTTPS handler in front 
of the existing ones (without resorting to any hacks).

----------

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

Reply via email to