mirror of
https://github.com/curl/curl.git
synced 2026-08-24 19:23:38 +03:00
- David McCreedy brought a fix and a new test case (129) to make libcurl work
again when downloading files over FTP using ASCII and it turns out that the final size of the file is not the same as the initial size the server reported. This is very common since servers don't take the newline conversions into account.
This commit is contained in:
parent
77a17a21d1
commit
a5ca3f1754
4 changed files with 12 additions and 2 deletions
|
|
@ -2204,6 +2204,8 @@ static CURLcode ftp_state_get_resp(struct connectdata *conn,
|
|||
|
||||
if(size > data->req.maxdownload && data->req.maxdownload > 0)
|
||||
size = data->req.size = data->req.maxdownload;
|
||||
else if((instate != FTP_LIST) && (data->set.prefer_ascii))
|
||||
size = -1; /* kludge for servers that understate ASCII mode file size */
|
||||
|
||||
infof(data, "Maxdownload = %" FORMAT_OFF_T "\n", data->req.maxdownload);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue