Permalink
Browse files

HTTPSConnection supports source_address

bit inconsistent with argument ordering I think, worth going back to
double check that at some point
  • Loading branch information...
1 parent e5036ee commit 43b8c157bda6d6230aca3523761fd6f1d8dae1af @infracanophile committed Apr 4, 2013
Showing with 6 additions and 3 deletions.
  1. +6 −3 requests/packages/urllib3/connectionpool.py
@@ -523,13 +523,14 @@ class HTTPSConnectionPool(HTTPConnectionPool):
scheme = 'https'
def __init__(self, host, port=None,
+ source_address=None,
strict=False, timeout=None, maxsize=1,
block=False, headers=None,
key_file=None, cert_file=None, cert_reqs=None,
ca_certs=None, ssl_version=None,
assert_hostname=None, assert_fingerprint=None):
- HTTPConnectionPool.__init__(self, host, port,
+ HTTPConnectionPool.__init__(self, host, port, source_address,
strict, timeout, maxsize,
block, headers)
self.key_file = key_file
@@ -555,11 +556,13 @@ def _new_conn(self):
return HTTPSConnection(host=self.host,
port=self.port,
- strict=self.strict)
+ strict=self.strict,
+ source_address=self.source_address)
connection = VerifiedHTTPSConnection(host=self.host,
port=self.port,
- strict=self.strict)
+ strict=self.strict,
+ source_address=self.source_address)
connection.set_cert(key_file=self.key_file, cert_file=self.cert_file,
cert_reqs=self.cert_reqs, ca_certs=self.ca_certs,
assert_hostname=self.assert_hostname,

0 comments on commit 43b8c15

Please sign in to comment.