Tests: added SNI test without hostname in request.

This commit is contained in:
Andrei Zeliankou
2021-07-23 15:37:03 +01:00
parent f965e358b6
commit 960ffc9967
2 changed files with 21 additions and 1 deletions

View File

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