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>
This commit is contained in:
brian m. carlson
2024-10-23 00:45:53 +00:00
committed by Taylor Blau
parent 05dd4ec507
commit f47a1faa9b
2 changed files with 0 additions and 16 deletions

View File

@ -28,17 +28,6 @@
* introduced, oldest first, in the official version of cURL library. * introduced, oldest first, in the official version of cURL library.
*/ */
/**
* CURL_HTTP_VERSION_2 was added in 7.43.0, released in June 2015.
*
* The CURL_HTTP_VERSION_2 alias (but not CURL_HTTP_VERSION_2_0) has
* always been a macro, not an enum field (checked on curl version
* 7.78.0)
*/
#if LIBCURL_VERSION_NUM >= 0x072b00
#define GIT_CURL_HAVE_CURL_HTTP_VERSION_2 1
#endif
/** /**
* CURLSSLOPT_NO_REVOKE was added in 7.44.0, released in August 2015. * CURLSSLOPT_NO_REVOKE was added in 7.44.0, released in August 2015.
* *

5
http.c
View File

@ -980,7 +980,6 @@ static long get_curl_allowed_protocols(int from_user, struct strbuf *list)
return bits; return bits;
} }
#ifdef GIT_CURL_HAVE_CURL_HTTP_VERSION_2
static int get_curl_http_version_opt(const char *version_string, long *opt) static int get_curl_http_version_opt(const char *version_string, long *opt)
{ {
int i; int i;
@ -1003,8 +1002,6 @@ static int get_curl_http_version_opt(const char *version_string, long *opt)
return -1; /* not found */ return -1; /* not found */
} }
#endif
static CURL *get_curl_handle(void) static CURL *get_curl_handle(void)
{ {
CURL *result = curl_easy_init(); CURL *result = curl_easy_init();
@ -1022,7 +1019,6 @@ static CURL *get_curl_handle(void)
curl_easy_setopt(result, CURLOPT_SSL_VERIFYHOST, 2); curl_easy_setopt(result, CURLOPT_SSL_VERIFYHOST, 2);
} }
#ifdef GIT_CURL_HAVE_CURL_HTTP_VERSION_2
if (curl_http_version) { if (curl_http_version) {
long opt; long opt;
if (!get_curl_http_version_opt(curl_http_version, &opt)) { if (!get_curl_http_version_opt(curl_http_version, &opt)) {
@ -1030,7 +1026,6 @@ static CURL *get_curl_handle(void)
curl_easy_setopt(result, CURLOPT_HTTP_VERSION, opt); curl_easy_setopt(result, CURLOPT_HTTP_VERSION, opt);
} }
} }
#endif
curl_easy_setopt(result, CURLOPT_NETRC, CURL_NETRC_OPTIONAL); curl_easy_setopt(result, CURLOPT_NETRC, CURL_NETRC_OPTIONAL);
curl_easy_setopt(result, CURLOPT_HTTPAUTH, CURLAUTH_ANY); curl_easy_setopt(result, CURLOPT_HTTPAUTH, CURLAUTH_ANY);