Check that we don't read past the end of the chunked-encoding stream
(self)
| 1359 | resp.close() |
| 1360 | |
| 1361 | def test_chunked_sync(self): |
| 1362 | """Check that we don't read past the end of the chunked-encoding stream""" |
| 1363 | expected = chunked_expected |
| 1364 | extradata = "extradata" |
| 1365 | sock = FakeSocket(chunked_start + last_chunk + trailers + chunked_end + extradata) |
| 1366 | resp = client.HTTPResponse(sock, method="GET") |
| 1367 | resp.begin() |
| 1368 | self.assertEqual(resp.read(), expected) |
| 1369 | # the file should now have our extradata ready to be read |
| 1370 | self.assertEqual(sock.file.read(), extradata.encode("ascii")) #we read to the end |
| 1371 | resp.close() |
| 1372 | |
| 1373 | def test_content_length_sync(self): |
| 1374 | """Check that we don't read past the end of the Content-Length stream""" |
nothing calls this directly
no test coverage detected