git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v2 05/12] git-curl-compat: remove check for curl 7.43.0

From
brian m. carlson <sandals@crustytoothpaste.net>
Date
Oct 23, 2024, 00:45 UTC
Message-ID
<20241023004600.1645313-6-sandals@crustytoothpaste.net>
In-Reply-To
<20241023004600.1645313-1-sandals@crustytoothpaste.net>

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>
---
 git-curl-compat.h | 11 -----------
 http.c            |  5 -----
 2 files changed, 16 deletions(-)
diff --git a/git-curl-compat.h b/git-curl-compat.h
index b301ef154c..cd970e34d6 100644
--- a/git-curl-compat.h
+++ b/git-curl-compat.h
@@ -28,17 +28,6 @@
  * 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.
  *
diff --git a/http.c b/http.c
index cdef059090..945df9a628 100644
--- a/http.c
+++ b/http.c
@@ -980,7 +980,6 @@ static long get_curl_allowed_protocols(int from_user, struct strbuf *list)
 	return bits;
 }
 
-#ifdef GIT_CURL_HAVE_CURL_HTTP_VERSION_2
 static int get_curl_http_version_opt(const char *version_string, long *opt)
 {
 	int i;
@@ -1003,8 +1002,6 @@ static int get_curl_http_version_opt(const char *version_string, long *opt)
 	return -1; /* not found */
 }
 
-#endif
-
 static CURL *get_curl_handle(void)
 {
 	CURL *result = curl_easy_init();
@@ -1022,7 +1019,6 @@ static CURL *get_curl_handle(void)
 		curl_easy_setopt(result, CURLOPT_SSL_VERIFYHOST, 2);
 	}
 
-#ifdef GIT_CURL_HAVE_CURL_HTTP_VERSION_2
     if (curl_http_version) {
 		long 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);
 		}
     }
-#endif
 
 	curl_easy_setopt(result, CURLOPT_NETRC, CURL_NETRC_OPTIONAL);
 	curl_easy_setopt(result, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
Previous: brian m. carlsonNext: brian m. carlson
Message 43 of 56 in “Update versions of libcurl and Perl”
  1. 00/13 Update versions of libcurl and Perlbrian m. carlson, Oct 10, 2024
  2. 01/13 git-curl-compat: remove check for curl 7.21.5brian m. carlson, Oct 10, 2024
  3. 02/13 git-curl-compat: remove check for curl 7.25.0brian m. carlson, Oct 10, 2024
  4. 03/13 git-curl-compat: remove check for curl 7.34.0brian m. carlson, Oct 10, 2024
  5. 04/13 git-curl-compat: remove check for curl 7.39.0brian m. carlson, Oct 10, 2024
  6. 05/13 git-curl-compat: remove check for curl 7.43.0brian m. carlson, Oct 10, 2024
  7. 06/13 git-curl-compat: remove check for curl 7.44.0brian m. carlson, Oct 10, 2024
  8. 07/13 git-curl-compat: remove check for curl 7.52.0brian m. carlson, Oct 10, 2024
  9. 09/13 git-curl-compat: remove check for curl 7.56.0brian m. carlson, Oct 10, 2024
  10. Patrick SteinhardtOct 11, 2024
  11. Jeff KingOct 11, 2024
  12. Patrick SteinhardtOct 11, 2024
  13. Junio C HamanoOct 11, 2024
  14. 10/13 INSTALL: document requirement for libcurl 7.61.0brian m. carlson, Oct 10, 2024
  15. 12/13 INSTALL: require Perl 5.26.0brian m. carlson, Oct 10, 2024
  16. Oswald BuddenhagenOct 11, 2024
  17. brian m. carlsonOct 15, 2024
  18. 11/13 Require Perl 5.26.0brian m. carlson, Oct 10, 2024
  19. 08/13 git-curl-compat: remove check for curl 7.53.0brian m. carlson, Oct 10, 2024
  20. 13/13 gitweb: make use of s///rbrian m. carlson, Oct 10, 2024
  21. Jeff KingOct 11, 2024
  22. Junio C HamanoOct 11, 2024
  23. Eric SunshineOct 11, 2024
  24. Junio C HamanoOct 11, 2024
  25. Alejandro R. SedeñoOct 11, 2024
  26. Eric SunshineOct 11, 2024
  27. brian m. carlsonOct 11, 2024
  28. Eric SunshineOct 15, 2024
  29. Taylor BlauOct 15, 2024
  30. brian m. carlsonOct 15, 2024
  31. Alejandro R. SedeñoOct 16, 2024
  32. Eli SchwartzOct 22, 2024
  33. brian m. carlsonOct 22, 2024
  34. Alejandro R. SedeñoOct 11, 2024
  35. Junio C HamanoOct 11, 2024
  36. Alejandro R. SedeñoOct 14, 2024
  37. Patrick SteinhardtOct 17, 2024
  38. 00/12 Update versions of libcurl and Perlbrian m. carlson, Oct 23, 2024
  39. 04/12 git-curl-compat: remove check for curl 7.39.0brian m. carlson, Oct 23, 2024
  40. 03/12 git-curl-compat: remove check for curl 7.34.0brian m. carlson, Oct 23, 2024
  41. 01/12 git-curl-compat: remove check for curl 7.21.5brian m. carlson, Oct 23, 2024
  42. 02/12 git-curl-compat: remove check for curl 7.25.0brian m. carlson, Oct 23, 2024
  43. 05/12 git-curl-compat: remove check for curl 7.43.0brian m. carlson, Oct 23, 2024
  44. 06/12 git-curl-compat: remove check for curl 7.44.0brian m. carlson, Oct 23, 2024
  45. 08/12 git-curl-compat: remove check for curl 7.53.0brian m. carlson, Oct 23, 2024
  46. 09/12 git-curl-compat: remove check for curl 7.56.0brian m. carlson, Oct 23, 2024
  47. 12/12 gitweb: make use of s///rbrian m. carlson, Oct 23, 2024
  48. Oswald BuddenhagenOct 23, 2024
  49. brian m. carlsonOct 24, 2024
  50. 10/12 INSTALL: document requirement for libcurl 7.61.0brian m. carlson, Oct 23, 2024
  51. 11/12 Require Perl 5.26.0brian m. carlson, Oct 23, 2024
  52. rsbecker@nexbridge.comOct 23, 2024
  53. 07/12 git-curl-compat: remove check for curl 7.52.0brian m. carlson, Oct 23, 2024
  54. Taylor BlauOct 23, 2024
  55. Patrick SteinhardtOct 24, 2024
  56. brian m. carlsonOct 24, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.