cURL / Mailing Lists / curl-users / Single Mail

curl-users

Auto resume bug in lib/ftp.c

From: Adrian Kreher <ak10864_at_gmail.com>
Date: Wed, 9 Jul 2008 21:48:14 -0500

Hello all,

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.

Hope this helps,

-- 
Adrian Kreher
-------------------------------------------------------------------
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