Commit f5488c7a authored by Senthil Kumaran's avatar Senthil Kumaran

httplib test for early eof response. related to Issue13684

parent 150a3a01
......@@ -349,6 +349,14 @@ class BasicTest(TestCase):
resp.begin()
self.assertRaises(httplib.LineTooLong, resp.read)
def test_early_eof(self):
# Test httpresponse with no \r\n termination,
body = "HTTP/1.1 200 Ok"
sock = FakeSocket(body)
resp = httplib.HTTPResponse(sock)
resp.begin()
self.assertEqual(resp.read(), '')
self.assertTrue(resp.isclosed())
class OfflineTest(TestCase):
def test_responses(self):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment