Tests: test_settings_header_read_timeout_update adjusted.
@@ -25,10 +25,11 @@ Connection: close
self.assertEqual(resp['status'], 408, 'status header read timeout')
- @unittest.expectedFailure
def test_settings_header_read_timeout_update(self):
self.load('empty')
+ r = None
+
self.conf({'http': { 'header_read_timeout': 4 }}, 'settings')
(resp, sock) = self.http(b"""GET / HTTP/1.1
@@ -42,8 +43,12 @@ Connection: close
time.sleep(2)
(resp, sock) = self.http(b"""X-Blah: blah
-""", start=True, sock=sock, raw=True, no_recv=True)
+""", start=True, sock=sock, raw=True)
+
+ if len(resp) != 0:
+ sock.close()
+ else:
time.sleep(2)
resp = self.http(b"""Connection: close
