Tests: fixed test_settings_header_read_timeout_update.

This commit is contained in:
Andrey Zelenkov
2018-09-04 02:30:27 +03:00
parent 9f5349d347
commit 58d23eb5b4

View File

@@ -32,12 +32,17 @@ Connection: close
self.conf({'http': { 'header_read_timeout': 4 }}, '/settings') self.conf({'http': { 'header_read_timeout': 4 }}, '/settings')
(resp, sock) = self.http(b"""GET / HTTP/1.1 (resp, sock) = self.http(b"""GET / HTTP/1.1
""", start=True, raw=True) """, start=True, raw=True, no_recv=True)
time.sleep(2) time.sleep(2)
(resp, sock) = self.http(b"""Host: localhost (resp, sock) = self.http(b"""Host: localhost
""", start=True, sock=sock, raw=True) """, start=True, sock=sock, raw=True, no_recv=True)
time.sleep(2)
(resp, sock) = self.http(b"""X-Blah: blah
""", start=True, sock=sock, raw=True, no_recv=True)
time.sleep(2) time.sleep(2)
@@ -45,8 +50,6 @@ Connection: close
""", sock=sock, raw=True) """, sock=sock, raw=True)
time.sleep(2)
self.assertEqual(resp['status'], 408, self.assertEqual(resp['status'], 408,
'status header read timeout update') 'status header read timeout update')