git-curl-compat: remove check for curl 7.43.0

libcurl 7.43.0 was released in June 2015, which is over nine years ago, and no major operating system vendor is still providing security support for it. Debian 9 and Ubuntu 16.04, both of which are out of mainstream security support, have supported a newer version, and RHEL 8, which is still in support, also has a newer version. Remove the check for this version and use this functionality unconditionally. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Taylor Blau <me@ttaylorr.com>

brian m. carlson committed Oct 23, 2024 at 00:45 UTC f47a1faa9bd147048bf5d9d93a043e9a438d30d0
2 files changed -16
git-curl-compat.h
-11
@@ -28,17 +28,6 @@
28 * introduced, oldest first, in the official version of cURL library.
29 */
30
31 -/**
32 - * CURL_HTTP_VERSION_2 was added in 7.43.0, released in June 2015.
33 - *
34 - * The CURL_HTTP_VERSION_2 alias (but not CURL_HTTP_VERSION_2_0) has
35 - * always been a macro, not an enum field (checked on curl version
36 - * 7.78.0)
37 - */
38 -#if LIBCURL_VERSION_NUM >= 0x072b00
39 -#define GIT_CURL_HAVE_CURL_HTTP_VERSION_2 1
40 -#endif
41 -
31 /**
32 * CURLSSLOPT_NO_REVOKE was added in 7.44.0, released in August 2015.
33 *
http.c
-5
@@ -980,7 +980,6 @@ static long get_curl_allowed_protocols(int from_user, struct strbuf *list)
980 return bits;
981 }
982
983 -#ifdef GIT_CURL_HAVE_CURL_HTTP_VERSION_2
983 static int get_curl_http_version_opt(const char *version_string, long *opt)
984 {
985 int i;
@@ -1003,8 +1002,6 @@ static int get_curl_http_version_opt(const char *version_string, long *opt)
1002 return -1; /* not found */
1003 }
1004
1006 -#endif
1007 -
1005 static CURL *get_curl_handle(void)
1006 {
1007 CURL *result = curl_easy_init();
@@ -1022,7 +1019,6 @@ static CURL *get_curl_handle(void)
1019 curl_easy_setopt(result, CURLOPT_SSL_VERIFYHOST, 2);
1020 }
1021
1025 -#ifdef GIT_CURL_HAVE_CURL_HTTP_VERSION_2
1022 if (curl_http_version) {
1023 long opt;
1024 if (!get_curl_http_version_opt(curl_http_version, &opt)) {
@@ -1030,7 +1026,6 @@ static CURL *get_curl_handle(void)
1026 curl_easy_setopt(result, CURLOPT_HTTP_VERSION, opt);
1027 }
1028 }
1033 -#endif
1029
1030 curl_easy_setopt(result, CURLOPT_NETRC, CURL_NETRC_OPTIONAL);
1031 curl_easy_setopt(result, CURLOPT_HTTPAUTH, CURLAUTH_ANY);