cURL / Mailing Lists / curl-library / Single Mail


Re: Incorrect HTTP range request with CURLOPT_RESUME_FROM_LARGE

From: Stephen Collyer <>
Date: Mon, 30 Jun 2008 11:23:36 +0100

Tor Arntsen wrote:
> On Sat, Jun 28, 2008 at 6:23 PM, Daniel Stenberg <> wrote:
>> On Sat, 28 Jun 2008, Stephen Collyer wrote:
>>> One point though: isn't the format "bytes=-5248835289980310801-" an
>>> illegal range request ? I wasn't expecting the leading "-" to be there.
>> It looks like a problem yes and if it persists after your large file fix
>> I'll be intrested in further details on how we can repeat it.
> I think the leading "-" is correct (in a weird sense..) in this case,
> because it's only as a negative number that that value ends up with
> matching the original number (3173103) in the four last bytes.
> -Tor
> ./hx -5248835289980310801
> 0xb728641d00306aef
> ./hx 5248835289980310801
> 0x48d79be2ffcf9511

Well spotted, once again. Yes, that's probably what's happening.
It hadn't occurred to me that the leading "-" was part of the
number. However, that implies a minor bug in curl, I think.
The range request value should be interpreted as an unsigned long long,
since it never makes sense to send a negative range.

Steve Collyer
Netspinner Ltd
Received on 2008-06-30