fix PUT request with chunked transfer encoding default tip

Sun, 17 Nov 2024 13:11:14 +0100

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Sun, 17 Nov 2024 13:11:14 +0100
changeset 847
61a3892a8dfb
parent 846
be77f90ec48e

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);

mercurial