diff sat_pubsub/gateway.py @ 275:9c74cd2635f6

Fix getPageWithFactory
author Christopher Zorn <tofu@thetofu.com>
date Thu, 01 Aug 2013 16:22:14 -0700
parents 6641ea7990ee
children 002c59dbc23f
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