cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-library Mailing List Archives

Re: Incorrect HTTP range request with CURLOPT_RESUME_FROM_LARGE

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Sat, 28 Jun 2008 18:23:46 +0200 (CEST)

On Sat, 28 Jun 2008, Stephen Collyer wrote:

>> 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.
>
> Thanks. That's an interesting observation. I'm beginning to think that it's
> something to do with my build options. In my app. code. sizeof(curl_off_t)
> is 4, which is clearly screwy for CURLOPT_RESUME_FROM_LARGE.

Yes, this is a clear hint that you're not building your app with the "proper"
large file flags.

> I'm not sure what the installed curl libs are built with - is there any easy
> way to find out ?

If curl_version_info returns saying it supports large files, you know your app
has to do it too for the _LARGE options to work.

> 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.

-- 
  / daniel.haxx.se
Received on 2008-06-28

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET