cURL / Mailing Lists / curl-library / Single Mail


Re: Ranged downloads on file:// URLs

From: Daniel Egger <>
Date: Sun, 6 Jan 2008 20:08:23 +0100

On 05.01.2008, at 13:21, Daniel Stenberg wrote:

> But test case 1020 fails for me, and if I understood you right your
> test280 worked for you so I though that perhaps you can have a look
> at this?

Hm, the (expected) test result in the case is incomplete. Range -9 means
from index 0 to (including) index 9 which are 10 bytes, so the numbers
1 to 0 in this testcase.

I've no idea where the trailing 0 got lost and apologize for the

> Oh, btw if file_range() is to return a CURLcode then I think the
> caller should also check the return code. But as the function
> currently works, it always returns OK so I think we can just as well
> make it a void. What do you say?

file_range () is basically a copy of ftp_range less the setting of some
ftp related parameter. It's IMHO a candidate for refactoring and reuse.
Short: I agree. :-D

Other than that I'm fairly confident that this range patch works
because otherwise many people would be swearing at me by now.

Received on 2008-01-06