|
|
|
@ -720,10 +720,19 @@ class HTTPSClientCertTransport(HttpTransport):
|
|
|
|
|
self.cookie_callback = cookie_callback
|
|
|
|
|
self.user_agent_string = user_agent_string
|
|
|
|
|
log.debug("Proxy: %s", self.options.proxy)
|
|
|
|
|
from dslib.network import ProxyManager
|
|
|
|
|
proxy_handler = ProxyManager.HTTPS_PROXY.create_proxy_handler()
|
|
|
|
|
proxy_auth_handler = \
|
|
|
|
|
ProxyManager.HTTPS_PROXY.create_proxy_auth_handler()
|
|
|
|
|
#TODO to be removed:
|
|
|
|
|
# artifacts from old times:
|
|
|
|
|
|
|
|
|
|
# from dslib.network import ProxyManager
|
|
|
|
|
# proxy_handler = ProxyManager.HTTPS_PROXY.create_proxy_handler()
|
|
|
|
|
# proxy_auth_handler = ProxyManager.HTTPS_PROXY.create_proxy_auth_handler()
|
|
|
|
|
|
|
|
|
|
# apparently, dslib simply returned None on create_proxy_auth_handler
|
|
|
|
|
proxy_auth_handler = None
|
|
|
|
|
# and create_proxy_handler SHOULD HAVE eval'd to this:
|
|
|
|
|
# proxy_handler = u2.ProxyHandler({"https" : "https://hostname"})
|
|
|
|
|
# but because no hostname was given, it also just returned None
|
|
|
|
|
proxy_handler = None
|
|
|
|
|
if ca_certs or (client_keyfile and client_certfile) \
|
|
|
|
|
or (client_keyobj and client_certobj):
|
|
|
|
|
https_handler = CheckingClientHTTPSHandler(parent,
|
|
|
|
@ -739,10 +748,13 @@ class HTTPSClientCertTransport(HttpTransport):
|
|
|
|
|
self.urlopener = u2.build_opener(SUDSHTTPRedirectHandler(),
|
|
|
|
|
u2.HTTPCookieProcessor(self.cookiejar),
|
|
|
|
|
https_handler)
|
|
|
|
|
|
|
|
|
|
#these two literally do nothing right now
|
|
|
|
|
if proxy_handler:
|
|
|
|
|
self.urlopener.add_handler(proxy_handler)
|
|
|
|
|
if proxy_auth_handler:
|
|
|
|
|
self.urlopener.add_handler(proxy_auth_handler)
|
|
|
|
|
|
|
|
|
|
self.urlopener.addheaders = [('User-agent', self.user_agent_string)]
|
|
|
|
|
|
|
|
|
|
###############################################################################
|
|
|
|
|