summaryrefslogtreecommitdiffhomepage
path: root/test/test_settings.py
diff options
context:
space:
mode:
authorAndrey Zelenkov <zelenkov@nginx.com>2019-02-27 19:15:02 +0300
committerAndrey Zelenkov <zelenkov@nginx.com>2019-02-27 19:15:02 +0300
commit4de2c8b56719fce6b95b6f8a613b349590a3676f (patch)
tree28db74ede291a8cd16c34fdaa277370929a2ecfe /test/test_settings.py
parent379e4c75fdf99439e481f739324d9c6d6d1b18ab (diff)
downloadunit-4de2c8b56719fce6b95b6f8a613b349590a3676f.tar.gz
unit-4de2c8b56719fce6b95b6f8a613b349590a3676f.tar.bz2
Tests: added "Host" and "Connetion" headers where necessary.
Also minor header organizing.
Diffstat (limited to 'test/test_settings.py')
-rw-r--r--test/test_settings.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/test/test_settings.py b/test/test_settings.py
index d272f701..324042f9 100644
--- a/test/test_settings.py
+++ b/test/test_settings.py
@@ -118,6 +118,7 @@ Connection: close
Host: localhost
Content-Type: text/html
Content-Length: %d
+Connection: close
""" % data_len + ('X' * data_len)
@@ -140,15 +141,15 @@ Content-Length: %d
self.conf({'http': { 'idle_timeout': 2 }}, 'settings')
(resp, sock) = self.get(headers={
- 'Connection': 'keep-alive',
- 'Host': 'localhost'
+ 'Host': 'localhost',
+ 'Connection': 'keep-alive'
}, start=True)
time.sleep(3)
resp = self.get(headers={
- 'Connection': 'close',
- 'Host': 'localhost'
+ 'Host': 'localhost',
+ 'Connection': 'close'
}, sock=sock)
self.assertEqual(resp['status'], 408, 'status idle timeout')