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 pitrou
Recipients asvetlov, eranrund, orsenthil, piotr.dobrogost, pitrou
Date 2012-11-04.14:47:40
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1352040433.3394.10.camel@localhost.localdomain>
In-reply-to <1351947127.21.0.260755574002.issue16298@psf.upfronthosting.co.za>
Content
> The patch is probably trivial - however I would still like some
> verification.
> Would it be correct to call self.close() when fp.read returns ''? In
> case self.length is not present, I don't see a way around this anyway.
> When it is present, and fp.read returns '', how should we go about
> that? We can either return less data, or raise an exception to
> indicate that the connection terminated prematurely.

It's probably better to return less data. No need to break user programs
when they download from a slightly misbehaved Web site.

The patch should include some kind of unit test, if possible. See
Lib/test/test_httplib.py.
History
Date User Action Args
2012-11-04 14:47:41pitrousetrecipients: + pitrou, orsenthil, asvetlov, piotr.dobrogost, eranrund
2012-11-04 14:47:41pitroulinkissue16298 messages
2012-11-04 14:47:40pitroucreate