diff -r be77f90ec48e -r 61a3892a8dfb libidav/methods.c --- a/libidav/methods.c Tue Oct 29 17:54:07 2024 +0100 +++ b/libidav/methods.c Sun Nov 17 13:11:14 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);