diff -r 8e7c57c23133 -r 5360027fb282 libidav/methods.c --- a/libidav/methods.c Fri Nov 15 21:50:20 2024 +0100 +++ b/libidav/methods.c Sun Nov 17 15:19:32 2024 +0100 @@ -1037,7 +1037,7 @@ curl_easy_setopt(handle, CURLOPT_INFILESIZE_LARGE, (curl_off_t)length); } else if(length == 0) { headers = curl_slist_append(headers, "Transfer-Encoding: chunked"); - curl_easy_setopt(handle, CURLOPT_INFILESIZE_LARGE, (curl_off_t)1); + curl_easy_setopt(handle, CURLOPT_INFILESIZE_LARGE, (curl_off_t)-1); curl_easy_setopt(handle, CURLOPT_HTTPHEADER, headers); } else { curl_easy_setopt(handle, CURLOPT_INFILESIZE_LARGE, (curl_off_t)length);