This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author facundobatista
Recipients StyXman, djmitche, facundobatista, jjlee, mhammond
Date 2007-10-13.02:09:35
SpamBayes Score 0.13677433
Marked as misclassified No
Message-id <1192241376.85.0.602549446161.issue1580738@psf.upfronthosting.co.za>
In-reply-to
Content
Mark is ok, zero length responses are ok. But that has nothing to do
with self.length.

self.lenght reaching zero means that everything that needed to be read
is already read. If the read() method is called without an argument, it
reads everything until it reaches self.lenght, and then it closes self.

So, when is called with an argument, is ok to close self if after
reading something self.length reaches zero (note that this actually
means that something was read, and self.length was lowered down...)

If self is closed also in this instance (see the patch), all tests pass
ok, and how you use HTTPConnection reading small pieces and not the
whole thing, is actually simplified...
Files
File name Uploaded
httplib.py.diff facundobatista, 2007-10-13.02:09:35
History
Date User Action Args
2007-10-13 02:09:38facundobatistasetspambayes_score: 0.136774 -> 0.13677433
recipients: + facundobatista, mhammond, jjlee, djmitche, StyXman
2007-10-13 02:09:36facundobatistasetspambayes_score: 0.136774 -> 0.136774
messageid: <1192241376.85.0.602549446161.issue1580738@psf.upfronthosting.co.za>
2007-10-13 02:09:36facundobatistalinkissue1580738 messages
2007-10-13 02:09:35facundobatistacreate