From 6d0a48e586856d04f34801aacf7244ae958d247c Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 18 Sep 2024 14:09:08 +0200 Subject: [PATCH] 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 --- lib/sendf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.47.3