Check that we don't read past the end of the chunked-encoding stream
(self)
| 1405 | resp.close() |
| 1406 | |
| 1407 | def test_chunked_sync(self): |
| 1408 | """Check that we don't read past the end of the chunked-encoding stream""" |
| 1409 | expected = chunked_expected |
| 1410 | extradata = "extradata" |
| 1411 | sock = FakeSocket(chunked_start + last_chunk + trailers + chunked_end + extradata) |
| 1412 | resp = client.HTTPResponse(sock, method="GET") |
| 1413 | resp.begin() |
| 1414 | self.assertEqual(resp.read(), expected) |
| 1415 | # the file should now have our extradata ready to be read |
| 1416 | self.assertEqual(sock.file.read(), extradata.encode("ascii")) #we read to the end |
| 1417 | resp.close() |
| 1418 | |
| 1419 | def test_content_length_sync(self): |
| 1420 | """Check that we don't read past the end of the Content-Length stream""" |
nothing calls this directly
no test coverage detected