mirror of
https://github.com/curl/curl.git
synced 2026-08-25 14:03:36 +03:00
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:
parent
77431568d2
commit
b132e865b9
3 changed files with 13 additions and 2 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue