Tests: test_settings_header_read_timeout_update adjusted.
This commit is contained in:
@@ -25,10 +25,11 @@ Connection: close
|
|||||||
|
|
||||||
self.assertEqual(resp['status'], 408, 'status header read timeout')
|
self.assertEqual(resp['status'], 408, 'status header read timeout')
|
||||||
|
|
||||||
@unittest.expectedFailure
|
|
||||||
def test_settings_header_read_timeout_update(self):
|
def test_settings_header_read_timeout_update(self):
|
||||||
self.load('empty')
|
self.load('empty')
|
||||||
|
|
||||||
|
r = None
|
||||||
|
|
||||||
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
|
||||||
@@ -42,11 +43,15 @@ Connection: close
|
|||||||
time.sleep(2)
|
time.sleep(2)
|
||||||
|
|
||||||
(resp, sock) = self.http(b"""X-Blah: blah
|
(resp, sock) = self.http(b"""X-Blah: blah
|
||||||
""", start=True, sock=sock, raw=True, no_recv=True)
|
""", start=True, sock=sock, raw=True)
|
||||||
|
|
||||||
time.sleep(2)
|
if len(resp) != 0:
|
||||||
|
sock.close()
|
||||||
|
|
||||||
resp = self.http(b"""Connection: close
|
else:
|
||||||
|
time.sleep(2)
|
||||||
|
|
||||||
|
resp = self.http(b"""Connection: close
|
||||||
|
|
||||||
""", sock=sock, raw=True)
|
""", sock=sock, raw=True)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user