Fix CONNECT request timeout (with an ugly hack)

This commit is contained in:
Paul Tremberth 2016-06-21 17:14:41 +02:00
parent 99a93a0967
commit d89f9df52e
1 changed files with 7 additions and 1 deletions

View File

@ -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):