# HG changeset patch # User Olaf Wintermann # Date 1731845474 -3600 # Node ID 61a3892a8dfb48dfd6200023da8db0048d247073 # Parent be77f90ec48e79b4f30155a184c23a7daa4d6963 fix PUT request with chunked transfer encoding 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);