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:
parent
0a26170086
commit
b34606030d
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user