Sun, 17 Nov 2024 13:11:14 +0100
fix PUT request with chunked transfer encoding
libidav/methods.c | file | annotate | diff | comparison | revisions |
--- 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);