mirror of
https://github.com/curl/curl.git
synced 2026-07-24 14:57:17 +03:00
sendf: getting less data than "max allowed" is okay
Easily triggered when doing an FTP ranged download with the end range
larger than the file size.
A regression since 30de937bda (shipped in curl 8.9.0)
Add test 2307 to verify.
Reported-by: kupavcevdenis on github
Fixes #18283
Closes #18295
This commit is contained in:
parent
b2294996b6
commit
c5f76b8096
3 changed files with 64 additions and 4 deletions
|
|
@ -293,9 +293,9 @@ static CURLcode cw_download_write(struct Curl_easy *data,
|
|||
}
|
||||
|
||||
if((type & CLIENTWRITE_EOS) && !data->req.no_body &&
|
||||
(data->req.maxdownload > data->req.bytecount)) {
|
||||
(data->req.size > data->req.bytecount)) {
|
||||
failf(data, "end of response with %" FMT_OFF_T " bytes missing",
|
||||
data->req.maxdownload - data->req.bytecount);
|
||||
data->req.size - data->req.bytecount);
|
||||
return CURLE_PARTIAL_FILE;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue