mirror of https://github.com/scrapy/scrapy.git
Fix CONNECT request timeout (with an ugly hack)
This commit is contained in:
parent
99a93a0967
commit
d89f9df52e
|
|
@ -401,7 +401,13 @@ class UriResource(resource.Resource):
|
|||
return self
|
||||
|
||||
def render(self, request):
|
||||
return request.uri
|
||||
# Note: this is an ugly hack for CONNECT request timeout test.
|
||||
# Returning some data here fail SSL/TLS handshake
|
||||
# ToDo: implement proper HTTPS proxy tests, not faking them.
|
||||
if request.method != b'CONNECT':
|
||||
return request.uri
|
||||
else:
|
||||
return b''
|
||||
|
||||
|
||||
class HttpProxyTestCase(unittest.TestCase):
|
||||
|
|
|
|||
Loading…
Reference in New Issue