curl-library
Re: http error with CURLOPT_RESUME_FROM CURLOPT_FAILONERROR
Date: Tue, 25 Nov 2003 18:12:47 +0100 (CET)
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.
-- Daniel Stenberg -- http://curl.haxx.se/ -- http://daniel.haxx.se/ [[ Do not post private mails to this email address. They won't reach me. ]] ------------------------------------------------------- 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