Skip to content

Commit f47a1fa

Browse files
bk2204ttaylorr
authored andcommitted
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 <[email protected]> Signed-off-by: Taylor Blau <[email protected]>
1 parent 05dd4ec commit f47a1fa

File tree

2 files changed

+0
-16
lines changed

2 files changed

+0
-16
lines changed

git-curl-compat.h

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,6 @@
2828
* introduced, oldest first, in the official version of cURL library.
2929
*/
3030

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-
4231
/**
4332
* CURLSSLOPT_NO_REVOKE was added in 7.44.0, released in August 2015.
4433
*

http.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -980,7 +980,6 @@ static long get_curl_allowed_protocols(int from_user, struct strbuf *list)
980980
return bits;
981981
}
982982

983-
#ifdef GIT_CURL_HAVE_CURL_HTTP_VERSION_2
984983
static int get_curl_http_version_opt(const char *version_string, long *opt)
985984
{
986985
int i;
@@ -1003,8 +1002,6 @@ static int get_curl_http_version_opt(const char *version_string, long *opt)
10031002
return -1; /* not found */
10041003
}
10051004

1006-
#endif
1007-
10081005
static CURL *get_curl_handle(void)
10091006
{
10101007
CURL *result = curl_easy_init();
@@ -1022,15 +1019,13 @@ static CURL *get_curl_handle(void)
10221019
curl_easy_setopt(result, CURLOPT_SSL_VERIFYHOST, 2);
10231020
}
10241021

1025-
#ifdef GIT_CURL_HAVE_CURL_HTTP_VERSION_2
10261022
if (curl_http_version) {
10271023
long opt;
10281024
if (!get_curl_http_version_opt(curl_http_version, &opt)) {
10291025
/* Set request use http version */
10301026
curl_easy_setopt(result, CURLOPT_HTTP_VERSION, opt);
10311027
}
10321028
}
1033-
#endif
10341029

10351030
curl_easy_setopt(result, CURLOPT_NETRC, CURL_NETRC_OPTIONAL);
10361031
curl_easy_setopt(result, CURLOPT_HTTPAUTH, CURLAUTH_ANY);

0 commit comments

Comments
 (0)