Author martin.panter
Recipients SilentGhost, kristjan.jonsson, martin.panter, maubp, serhiy.storchaka
Date 2016-03-09.09:21:57
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1457515318.3.0.976665565187.issue26499@psf.upfronthosting.co.za>
In-reply-to
Content
Yes I agree it would be best to fix the bug(s) without major refactoring if practical.

To fix the other bug, I think the parameters in read1(n) and readline(limit) need to be capped at self.length.

The inherited BufferedIOBase.readlines() implementation should just call readline() multiple times. The point is that if you call readline() when self.length is reduced to zero, it should behave like EOF, rather than waiting for more data from the socket. To test this, you might be able to use the FakeSocket class. You might have to add a second HTTP response to the data, and test that readline() etc doesn’t read any of the second response.
History
Date User Action Args
2016-03-09 09:21:58martin.pantersetrecipients: + martin.panter, kristjan.jonsson, SilentGhost, maubp, serhiy.storchaka
2016-03-09 09:21:58martin.pantersetmessageid: <1457515318.3.0.976665565187.issue26499@psf.upfronthosting.co.za>
2016-03-09 09:21:58martin.panterlinkissue26499 messages
2016-03-09 09:21:57martin.pantercreate