From: Daniel Stenberg Date: Wed, 18 Sep 2024 12:09:08 +0000 (+0200) Subject: sendf: add condition to max-filesize check X-Git-Tag: curl-8_11_0~436 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6d0a48e586856d04f34801aacf7244ae958d247c;p=thirdparty%2Fcurl.git sendf: add condition to max-filesize check Since the max filesize check should not be performed while the body is ignored. Follow-up to aef384a7df23c5f52940112593f Closes #14958 --- diff --git a/lib/sendf.c b/lib/sendf.c index 6f566622fd..aeeae09015 100644 --- a/lib/sendf.c +++ b/lib/sendf.c @@ -300,7 +300,7 @@ static CURLcode cw_download_write(struct Curl_easy *data, /* Error on too large filesize is handled below, after writing * the permitted bytes */ - if(data->set.max_filesize) { + if(data->set.max_filesize && !data->req.ignorebody) { size_t wmax = get_max_body_write_len(data, data->set.max_filesize); if(nwrite > wmax) { nwrite = wmax;