curl-users
Re: [BUG] --continue and multiple URLs
Date: Mon, 25 Jun 2001 14:56:46 +0200 (MET DST)
On Thu, 21 Jun 2001, Björn Stenberg wrote:
> There seems to be a bug in 7.7.3. I haven't tested with 7.8, but I can't
> recall any discussion about this on the list so I guess it's still there.
>
> I did:
>
> # curl -O ftp://ftp.funet.fi/pub/X11/XFree86/4.0.2/source/X402src-1.tgz
>
> ...but interrupted it after about a meg, realizing it was better to use the
> multiple URL method. So I ran a new command:
>
> # curl -O -C -
> "ftp://ftp.funet.fi/pub/X11/XFree86/4.0.2/source/X402src-{1,2,3}.tgz"
Yes. I can confirm that this bug is exactly as Björn stated. If '-C -' is
used on the command line, 'resume_from' is set to 0 and 'use_resume' is set
to TRUE. (around line 760 in src/main.c)
The loop then sets the 'resume_from' field to whatever the local file size is
but only if it is zero. Thus, the second lap in the loop it is already set to
a non-zero value and will thus leave it at its previously set value.
This is a bug that probably has lived in there for a while. Try the attached
patch to reach a state of joy and happiness! ;-)
(I committed this fix to CVS already, as I truly believe it works.)
-- Daniel Stenberg -- curl dude -- http://curl.haxx.se/
- TEXT/PLAIN attachment: resume-loop.patch