cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: http error with CURLOPT_RESUME_FROM CURLOPT_FAILONERROR

From: zach diubaldo <zulu_at_cisco.com>
Date: Tue, 25 Nov 2003 11:36:07 -0800

I am really sorry to keep asking you question. I mean you have been
great and I really like cURL, its a great piece of software, very
helpful. You mentioned that some servers will not know the file size.
 Do you know when and why that would be? Or just point me in the
direction where I could do some research? Thanks once again, you have
been very helpful.

zach

Daniel Stenberg wrote:

>On Tue, 25 Nov 2003, zach diubaldo wrote:
>
>
>
>>I am using 7.10.5 on windows. I have just changed my code to grab the
>>header first and look to see what the remote size is and then test that with
>>what the local file size. That works good enough for me. I do have another
>>question. Am I guaranteed to have the same format of the header for every
>>http server?
>>
>>
>
>Yes. But you're not guaranteed that the server will tell you the size, as
>sometimes the server doesn't know.
>
>
>
>>All I am doing is writing the header to a file, then looking for
>>"Content-Length:" and grabbing the number after it.
>>
>>
>
>libcurl's header callback gurantees to always call you with complete headers,
>which makes it perfect to use to check for things like this, thus removing the
>need to store anything on disk for this simple functionality.
>
>
>

-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
Received on 2003-11-25