cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Auto resume bug in lib/ftp.c

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Wed, 9 Jul 2008 23:11:23 -0700

On Wed, Jul 09, 2008 at 09:48:14PM -0500, Adrian Kreher wrote:
> I believe I have found a bug in lib/ftp.c. Using the -C switch with - to have
> curl automatically detect the size is supposed to work if the server supports
> SIZE. I don't really know C, so my understanding is somewhat limited. From
> what I understand, src/main.c sets resume_from to 0 if it is supposed to
> automatically detect the size. However, lib/ftp.c checks to see if the value
> is less than to 0 (but not equal to). lib/http.c and lib/ssh.c both check if
> this value is also equal to 0, so they should handle this correctly, but I
> did not check.
>
> Using "-C -1" instead of "-C -" is a workaround for the time being.

You haven't actually reported the symptoms of the bug. What doesn't seem
to work? And which version of curl are you using?

Oddly enough, the test suite wasn't testing resumed ftp downloads with -C -
so I just added tests 1036 and 1037 to do so and they both work fine. Under
what conditions does this bug manifest itself?

>>> Dan

-- 
http://www.MoveAnnouncer.com              The web change of address service
          Let webmasters know that your web site has moved
-------------------------------------------------------------------
List admin: http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-users
FAQ:        http://curl.haxx.se/docs/faq.html
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2008-07-10