Skip to content

Instantly share code, notes, and snippets.

@zeekay
Last active August 29, 2015 14:12
Show Gist options
  • Save zeekay/fc8e648dcd5d0ad35c92 to your computer and use it in GitHub Desktop.
Save zeekay/fc8e648dcd5d0ad35c92 to your computer and use it in GitHub Desktop.
--- .sdk/lib/fancy_urllib/fancy_urllib/__init__.py
+++ .sdk/lib/fancy_urllib/fancy_urllib/__init__.py
@@ -384,7 +384,7 @@ class FancyProxyHandler(urllib2.ProxyHandler):
class FancyHTTPSHandler(urllib2.HTTPSHandler):
"""An HTTPSHandler that works with CONNECT-enabled proxies."""
- def do_open(self, http_class, req):
+ def do_open(self, http_class, req, **http_conn_args):
proxy_authorization = None
for header in req.headers:
if header.lower() == "proxy-authorization":
@@ -401,7 +401,8 @@ class FancyHTTPSHandler(urllib2.HTTPSHandler):
req._cert_file,
req._ca_certs,
proxy_authorization),
- req)
+ req,
+ **http_conn_args)
except urllib2.URLError, url_error:
try:
import ssl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment