aboutsummaryrefslogtreecommitdiffstats
path: root/remote-curl.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2024-04-15 14:11:44 -0700
committerJunio C Hamano <gitster@pobox.com>2024-04-15 14:11:44 -0700
commiteba498a77463e9d24c19c8d9473fd2152d5840c4 (patch)
treed0b0f253635fc54d69cc8b91946eee05a849b8df /remote-curl.c
parentMerge branch 'ps/t0610-umask-fix' (diff)
parentremote-curl: add Transfer-Encoding header only for older curl (diff)
downloadgit-eba498a77463e9d24c19c8d9473fd2152d5840c4.tar.gz
git-eba498a77463e9d24c19c8d9473fd2152d5840c4.zip
Merge branch 'jk/libcurl-8.7-regression-workaround'
Fix was added to work around a regression in libcURL 8.7.0 (which has already been fixed in their tip of the tree). * jk/libcurl-8.7-regression-workaround: remote-curl: add Transfer-Encoding header only for older curl INSTALL: bump libcurl version to 7.21.3 http: reset POSTFIELDSIZE when clearing curl handle
Diffstat (limited to 'remote-curl.c')
-rw-r--r--remote-curl.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/remote-curl.c b/remote-curl.c
index 31b02b8840..0b6d7815fd 100644
--- a/remote-curl.c
+++ b/remote-curl.c
@@ -1,4 +1,5 @@
#include "git-compat-util.h"
+#include "git-curl-compat.h"
#include "config.h"
#include "environment.h"
#include "gettext.h"
@@ -955,7 +956,9 @@ retry:
/* The request body is large and the size cannot be predicted.
* We must use chunked encoding to send it.
*/
+#ifdef GIT_CURL_NEED_TRANSFER_ENCODING_HEADER
headers = curl_slist_append(headers, "Transfer-Encoding: chunked");
+#endif
rpc->initial_buffer = 1;
curl_easy_setopt(slot->curl, CURLOPT_READFUNCTION, rpc_out);
curl_easy_setopt(slot->curl, CURLOPT_INFILE, rpc);