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 commit is contained in:
Daniel Stenberg 2007-08-20 21:54:00 +00:00
parent 77431568d2
commit b132e865b9
3 changed files with 13 additions and 2 deletions

View File

@ -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

View 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)

View File

@ -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);