changeset 275:9c74cd2635f6

Fix getPageWithFactory
author Christopher Zorn <tofu@thetofu.com>
date Thu, 01 Aug 2013 16:22:14 -0700
parents 6641ea7990ee
children b757c29b20d7
files sat_pubsub/gateway.py
diffstat 1 files changed, 3 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- 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