cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: download with http

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Mon, 29 Mar 2004 08:09:03 +0200 (CEST)

On Mon, 29 Mar 2004, Pingkui HOU wrote:

> I use the write callback function to get the response. Should I add a loop
> in somewhere in order to get the entire file?

The write callback will be called numerous times, until the whole file has
been transfered.

> ///CODE////////////

...

> ///////////////////////END CODE

I couldn't see any major flaw in the code. You should probably consider
checking the return code for the transfer when it returns complete, and you
should consider using CURLOPT_VERBOSE or even CURLOPT_DEBUGFUNCTION to get a
fully detailed trace of what is being sent and received, as that will make it
easier to track down your problem.

-- 
     Daniel Stenberg -- http://curl.haxx.se -- http://daniel.haxx.se
      Dedicated custom curl help for hire: http://haxx.se/curl.html
Received on 2004-03-29