summaryrefslogtreecommitdiffhomepage
path: root/test/unit/http.py
diff options
context:
space:
mode:
authorAndrei Zeliankou <zelenkov@nginx.com>2021-03-26 21:06:23 +0000
committerAndrei Zeliankou <zelenkov@nginx.com>2021-03-26 21:06:23 +0000
commite8577afc2126001db03d4b8ac1dd8670a2504322 (patch)
treeaf8e3416c79a17c9f44fd183bd87d6b1848b86ce /test/unit/http.py
parentc093ee7ec50233feb3ff0444c91e394abee4c52a (diff)
downloadunit-e8577afc2126001db03d4b8ac1dd8670a2504322.tar.gz
unit-e8577afc2126001db03d4b8ac1dd8670a2504322.tar.bz2
Tests: SNI.
Diffstat (limited to 'test/unit/http.py')
-rw-r--r--test/unit/http.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/unit/http.py b/test/unit/http.py
index 57e6ed3a..7706fe05 100644
--- a/test/unit/http.py
+++ b/test/unit/http.py
@@ -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: