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: Resuming on persistent connection

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 17 Apr 2001 16:53:16 +0200 (MET DST)

On Fri, 13 Apr 2001, Puneet Pawaia wrote:

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

Are you doing the downloads using the same libcurl handle and you're not
using a proxy? Then you've hit a bug in 7.7 and should upgrade to 7.7.1...

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

This is a bug. I can see it in the code right now... I'll have to work on
this, I'll get back with a patch later.

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

It is actually an internal variable that is set the first time and is not
properly reset between the transfers.

> Is this a bug or am I doing some thing wrong ?

As a workaround, use close/init between the transfers.

-- 
  Daniel Stenberg -- curl project maintainer -- http://curl.haxx.se/
_______________________________________________
Curl-library mailing list
Curl-library_at_lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/curl-library
Received on 2001-04-17

These mail archives are generated by hypermail.

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

File upload with ASP.NET