[BUNDLE] let PyCurl transport read multiple ranges.
mbp at canonical.com
Wed Jun 14 06:44:52 BST 2006
On 08/06/2006, at 9:04 PM, Johan Rydberg wrote:
> I spend a few minutes on Michael Ellermans proof-of-concept patch to
> let readv() to read multiple ranges at once.
> The differences between this patch and Ellermans are minimal;
> * I've wrapped pycurl.Curl objects in a Curl object.
> * Transport.clone() reuses the Curl-object from the base transport.
> * Only one Curl-object is used per transport.
> * Ranges are combined (i.e., 10-20,20-30 is combined to 10-30.)
> Because of a limitation to PyCurl (it is impossible to reset the RANGE
> option), we always do Range-requests. This is really not a problem,
> since if only one range is requested, the data is returned in plain
> format (not a MIME multipart message.)
+1 with me, seconding John's comment about the __readv method. I'll
wait to hear what mpe says before bringing it in though.
I'm pretty sure that you can remove the range header by setting it to
the empty string (or None) -- I can't remember which but it did work
More information about the bazaar