aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2007-08-20 21:54:00 +0000
committerDaniel Stenberg <daniel@haxx.se>2007-08-20 21:54:00 +0000
commitb132e865b9940bc65407da8365eccc2e37ed1016 (patch)
treefab0a649c73b50db4110b817cddadc87ccff3401 /lib
parent77431568d226b41831814f52a998ae0f30eeb33f (diff)
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.
Diffstat (limited to 'lib')
-rw-r--r--lib/ftp.c5
1 files changed, 4 insertions, 1 deletions
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);