Tests: SNI.

This commit is contained in:
Andrei Zeliankou
2021-03-26 21:06:23 +00:00
parent c093ee7ec5
commit e8577afc21
3 changed files with 306 additions and 4 deletions

View File

@@ -44,7 +44,8 @@ class TestHTTP():
sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)
if 'wrapper' in kwargs:
sock = kwargs['wrapper'](sock)
server_hostname = headers.get('Host', 'localhost')
sock = kwargs['wrapper'](sock, server_hostname=server_hostname)
connect_args = addr if sock_type == 'unix' else (addr, port)
try: