# HG changeset patch # User Christopher Zorn # Date 1375399334 25200 # Node ID 9c74cd2635f63040a045ad87e401952abcdd62ab # Parent 6641ea7990eeca1f52a0ffeb5979e7db6587c226 Fix getPageWithFactory diff -r 6641ea7990ee -r 9c74cd2635f6 sat_pubsub/gateway.py --- a/sat_pubsub/gateway.py Mon Oct 07 12:14:54 2013 +0200 +++ b/sat_pubsub/gateway.py Thu Aug 01 16:22:14 2013 -0700 @@ -735,17 +735,16 @@ See HTTPClientFactory to see what extra args can be passed. """ - scheme, host, port, path = client._parse(url) factory = client.HTTPClientFactory(url, *args, **kwargs) factory.protocol.handleStatus_204 = lambda self: self.handleStatus_200() - if scheme == 'https': + if factory.scheme == 'https': from twisted.internet import ssl if contextFactory is None: contextFactory = ssl.ClientContextFactory() - reactor.connectSSL(host, port, factory, contextFactory) + reactor.connectSSL(factory.host, factory.port, factory, contextFactory) else: - reactor.connectTCP(host, port, factory) + reactor.connectTCP(factory.host, factory.port, factory) return factory