]> granicus.if.org Git - curl/commitdiff
Based on a patch by Christian Vogt, the FTP code now sets the upcoming
authorDaniel Stenberg <daniel@haxx.se>
Mon, 20 Aug 2007 21:54:00 +0000 (21:54 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 20 Aug 2007 21:54:00 +0000 (21:54 +0000)
download transfer size much earlier to be possible to get read with
CURLINFO_CONTENT_LENGTH_DOWNLOAD as soon as possible.

CHANGES
RELEASE-NOTES
lib/ftp.c

diff --git a/CHANGES b/CHANGES
index 23291910ca3df39d5c0fabf3ce2d45f15b37b2b4..e8e2bb1bf50147ef5e97fcc5cd749f63cc773298 100644 (file)
--- 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
index 07be474ae334d8d9b1f1c41a74ab59a4947e3f77..6267f88f2c73db9227898284bc02e5458307171c 100644 (file)
@@ -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)
index 775c75f955a4659f6826040793d773334d5ac77b..3ea07c0a23236a667ef859b7723f4ccfd31e64c8 100644 (file)
--- 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);