curl-library
Resuming on persistent connection
Date: Fri, 13 Apr 2001 14:33:14 +0530
Hello All,
I am using libcurl 7.7 on win98 with VC++6
I am creating a curl handle and then going into a loop to download files
that are numbers sequentially till no more files are found.
This is working fine if the first file is started from the beginning.
However, if the first file is being resumed from some point using curl
option to resume, then the first file id downloaded correctly but the
remaining files are truncated by the amount the first file is to resume
from. I am calling the Curl option for resuming with a value of 0 when a
new file is started.
The structure of the logic is
create curl handle
while (file found on server)
if (resume is true)
curl_easy_setopt(curl_handle, CURLOPT_RESUME_FROM, previous download);
else
curl_easy_setopt(curl_handle, CURLOPT_RESUME_FROM, 0);
download file
endwhile
free curl handle
If I create the curl handle every time in the loop, then the problem does
not arise. This leads me to believe that perhaps the resume value for 0 is
being ignored or not being set the second time.
Is this a bug or am I doing some thing wrong ?
Please help.
Regards
Puneet
_______________________________________________
Curl-library mailing list
Curl-library_at_lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/curl-library
Received on 2001-04-15