diff --git a/CHANGES b/CHANGES index 23291910c..e8e2bb1bf 100644 --- a/CHANGES +++ b/CHANGES @@ -6,6 +6,12 @@ Changelog +Daniel S (20 August 2007) +- Based on a patch by Christian Vogt, the FTP code now sets the upcoming + download transfer size much earlier to be possible to get read with + CURLINFO_CONTENT_LENGTH_DOWNLOAD as soon as possible. This is very much in a + similar spirit to the HTTP size change from August 11 2007. + Daniel S (18 August 2007) - Robson Braga Araujo filed bug report #1776232 (http://curl.haxx.se/bug/view.cgi?id=1776232) about libcurl calling diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 07be474ae..6267f88f2 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -16,6 +16,7 @@ This release includes the following changes: o SCP and SFTP support now requires libssh2 0.16 or later o LDAP libraries are now linked "regularly" and not with dlopen o HTTP transfers have the download size info "available" earlier + o FTP transfers have the download size info "available" earlier This release includes the following bugfixes: @@ -66,6 +67,7 @@ advice from friends like these: Daniel Cater, Colin Hogben, Jofell Gallardo, Daniel Johnson, Ralf S. Engelschall, James Housley, Chris Flerackers, Patrick Monnerat, Jayesh A Shah, Greg Zavertnik, Peter O'Gorman, Greg Morse, Dmitriy Sergeyev, - Scott Cantor, Allen Pulsifer, Andrew Wansink, Robson Braga Araujo + Scott Cantor, Allen Pulsifer, Andrew Wansink, Robson Braga Araujo, + Christian Vogt Thanks! (and sorry if I forgot to mention someone) diff --git a/lib/ftp.c b/lib/ftp.c index 775c75f95..3ea07c0a2 100644 --- a/lib/ftp.c +++ b/lib/ftp.c @@ -2120,10 +2120,13 @@ static CURLcode ftp_state_size_resp(struct connectdata *conn, return result; } #endif + Curl_pgrsSetDownloadSize(data, filesize); result = ftp_state_post_size(conn); } - else if(instate == FTP_RETR_SIZE) + else if(instate == FTP_RETR_SIZE) { + Curl_pgrsSetDownloadSize(data, filesize); result = ftp_state_post_retr_size(conn, filesize); + } else if(instate == FTP_STOR_SIZE) { data->reqdata.resume_from = filesize; result = ftp_state_ul_setup(conn, TRUE);