1
0
mirror of https://github.com/scrapy/scrapy.git synced 2025-02-27 06:03:58 +00:00

remove duplicate context factory handling for non-ssl support in http1.0

This commit is contained in:
Daniel Graña 2012-05-15 11:32:52 -03:00
parent 0a26170086
commit b34606030d

View File

@ -1,9 +1,9 @@
"""Download handlers for http and https schemes"""
"""Download handlers for http and https schemes
"""
from twisted.internet import reactor
from scrapy.utils.misc import load_object
class HttpDownloadHandler(object):
def __init__(self, settings):
@ -19,7 +19,7 @@ class HttpDownloadHandler(object):
def _connect(self, factory):
host, port = factory.host, factory.port
if factory.scheme == 'https':
return reactor.connectSSL(host, port, factory, \
self.ClientContextFactory())
return reactor.connectSSL(host, port, factory,
self.ClientContextFactory())
else:
return reactor.connectTCP(host, port, factory)