Skip to content

Commit 2a7f646

Browse files
avargitster
authored andcommitted
http: correct version check for CURL_HTTP_VERSION_2
In d73019f (http: add support selecting http version, 2018-11-08) a dependency was added on CURL_HTTP_VERSION_2, but this feature was introduced in curl version 7.43.0, not 7.47.0, as the incorrect version check led us to believe. As looking through the history of that commit on the mailing list will reveal[1], the reason for this is that an earlier version of it depended on CURL_HTTP_VERSION_2TLS, which was introduced in libcurl 7.47.0. But the version that made it in in d73019f had dropped the dependency on CURL_HTTP_VERSION_2TLS, but the corresponding version check was not corrected. The newest symbol we depend on is CURL_HTTP_VERSION_2. It was added in 7.33.0, but the CURL_HTTP_VERSION_2 alias we used was added in 7.47.0. So we could support an even older version here, but let's just correct the checked version. 1. https://lore.kernel.org/git/[email protected]/ Signed-off-by: Ævar Arnfjörð Bjarmason <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 7ce3dcd commit 2a7f646

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

http.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -732,7 +732,7 @@ static long get_curl_allowed_protocols(int from_user)
732732
return allowed_protocols;
733733
}
734734

735-
#if LIBCURL_VERSION_NUM >=0x072f00
735+
#if LIBCURL_VERSION_NUM >=0x072b00
736736
static int get_curl_http_version_opt(const char *version_string, long *opt)
737737
{
738738
int i;
@@ -774,7 +774,7 @@ static CURL *get_curl_handle(void)
774774
curl_easy_setopt(result, CURLOPT_SSL_VERIFYHOST, 2);
775775
}
776776

777-
#if LIBCURL_VERSION_NUM >= 0x072f00 // 7.47.0
777+
#if LIBCURL_VERSION_NUM >= 0x072b00
778778
if (curl_http_version) {
779779
long opt;
780780
if (!get_curl_http_version_opt(curl_http_version, &opt)) {

0 commit comments

Comments
 (0)