libidav/methods.c

changeset 847
61a3892a8dfb
parent 816
839fefbdedc7
--- 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);

mercurial