Permalink
Browse files

Merge branch 'http_connection_factory' of git://github.com/tpodowd/bo…

…to into tpodowd-http_connection_factory
  • Loading branch information...
2 parents d902d22 + 27c772d commit 64def85ddb49ee07794cd256499b6340bfdbcb97 @garnaat garnaat committed Jun 13, 2012
Showing with 7 additions and 1 deletion.
  1. +7 −1 boto/connection.py
View
@@ -627,7 +627,13 @@ def new_http_connection(self, host, is_secure):
else:
boto.log.debug('establishing HTTP connection: kwargs=%s' %
self.http_connection_kwargs)
- connection = httplib.HTTPConnection(host,
+ if self.https_connection_factory:
+ # even though the factory says https, this is too handy
+ # to not be able to allow overriding for http also.
+ connection = self.https_connection_factory(host,
+ **self.http_connection_kwargs)
+ else:
+ connection = httplib.HTTPConnection(host,
**self.http_connection_kwargs)
if self.debug > 1:
connection.set_debuglevel(self.debug)

0 comments on commit 64def85

Please sign in to comment.