diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2013-12-17 19:49:48 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2013-12-17 19:49:48 (GMT) |
commit | c97f5ede8f15ab91b2bc224d6fd7c577b744af63 (patch) | |
tree | 021955b630c9659f651710dfdd8726f683e021b6 /Lib/test/test_httplib.py | |
parent | ea76e87cc26727d6ec8a139b3c9411154212e2ea (diff) | |
download | cpython-c97f5ede8f15ab91b2bc224d6fd7c577b744af63.zip cpython-c97f5ede8f15ab91b2bc224d6fd7c577b744af63.tar.gz cpython-c97f5ede8f15ab91b2bc224d6fd7c577b744af63.tar.bz2 |
Issue #20007: HTTPResponse.read(0) no more prematurely closes connection.
Original patch by Simon Sapin.
Diffstat (limited to 'Lib/test/test_httplib.py')
-rw-r--r-- | Lib/test/test_httplib.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/test_httplib.py b/Lib/test/test_httplib.py index 3e81a2c..f11fac3 100644 --- a/Lib/test/test_httplib.py +++ b/Lib/test/test_httplib.py @@ -153,6 +153,8 @@ class BasicTest(TestCase): sock = FakeSocket(body) resp = httplib.HTTPResponse(sock) resp.begin() + self.assertEqual(resp.read(0), '') # Issue #20007 + self.assertFalse(resp.isclosed()) self.assertEqual(resp.read(), 'Text') self.assertTrue(resp.isclosed()) |