]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'jk/libcurl-8.7-regression-workaround'
authorJunio C Hamano <gitster@pobox.com>
Mon, 15 Apr 2024 21:11:44 +0000 (14:11 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 15 Apr 2024 21:11:44 +0000 (14:11 -0700)
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

1  2 
remote-curl.c

diff --combined remote-curl.c
index 31b02b8840969d17c34715fb3b902c6d2b4a4f2d,603c11ba66724626c116333aeeb2d718097cc8ae..0b6d7815fddd1e36be4aae007d5109cf5ba32cf1
@@@ -1,4 -1,5 +1,5 @@@
  #include "git-compat-util.h"
+ #include "git-curl-compat.h"
  #include "config.h"
  #include "environment.h"
  #include "gettext.h"
@@@ -211,9 -212,14 +212,9 @@@ static int set_option(const char *name
                options.filter = xstrdup(value);
                return 0;
        } else if (!strcmp(name, "object-format")) {
 -              int algo;
                options.object_format = 1;
 -              if (strcmp(value, "true")) {
 -                      algo = hash_algo_by_name(value);
 -                      if (algo == GIT_HASH_UNKNOWN)
 -                              die("unknown object format '%s'", value);
 -                      options.hash_algo = &hash_algos[algo];
 -              }
 +              if (strcmp(value, "true"))
 +                      die(_("unknown value for object-format: %s"), value);
                return 0;
        } else {
                return 1 /* unsupported */;
@@@ -955,7 -961,9 +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);