]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
sendf: add condition to max-filesize check
authorDaniel Stenberg <daniel@haxx.se>
Wed, 18 Sep 2024 12:09:08 +0000 (14:09 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 18 Sep 2024 13:00:29 +0000 (15:00 +0200)
Since the max filesize check should not be performed while the body is
ignored.

Follow-up to aef384a7df23c5f52940112593f
Closes #14958

lib/sendf.c

index 6f566622fdae5862b58e875daf428cc9642ce0de..aeeae09015c76e4e55209007883a1b94a3e461a5 100644 (file)
@@ -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;