cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Incorrect HTTP range request with CURLOPT_RESUME_FROM_LARGE

From: Tor Arntsen <tor_at_spacetec.no>
Date: Fri, 27 Jun 2008 17:20:55 +0200

On Fri, Jun 27, 2008 at 3:54 PM, Stephen Collyer
<scollyer_at_netspinner.co.uk> wrote:

> startbyte is an unsigned long long. When this code runs with
> startbyte set to 3173103, curl emits a range request like:
>
>> Range: bytes=-5248835289980310801-
>
> Can anyone suggest what is being screwed up here ?

3173103 is 0x306aef in hex.
That very long number above is 0xb728641d00306aef in hex. The latter 4
bytes are the same as your actual number, as you can see.. Seems to be
a type problem somewhere, like if a location stored as 4-byte int is
read as an 8-byte long long on a little-endian host.
Received on 2008-06-27