Skip to content

Commit 7ce3dcd

Browse files
avargitster
authored andcommitted
http: drop support for curl < 7.18.0 (again)
In 644de29 (http: drop support for curl < 7.19.4, 2021-07-30) we dropped support for curl < 7.19.4, so we can drop support for this non-obvious dependency on curl < 7.18.0. It's non-obvious because in curl's hex version notation 0x071800 is version 7.24.0, *not* 7.18.0, so at a glance this patch looks incorrect. But it's correct, because the existing version check being removed here is wrong. The check guards use of the following curl defines: CURLPROXY_SOCKS4 7.10 CURLPROXY_SOCKS4A 7.18.0 CURLPROXY_SOCKS5 7.10 CURLPROXY_SOCKS5_HOSTNAME 7.18.0 I.e. the oldest version that has these is in fact 7.18.0, not 7.24.0. That we were checking 7.24.0 is just an mistake in 6d7afe0 (remote-http(s): support SOCKS proxies, 2015-10-26), i.e. its author confusing base 10 and base 16. Signed-off-by: Ævar Arnfjörð Bjarmason <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 2d4032c commit 7ce3dcd

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

http.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -927,7 +927,6 @@ static CURL *get_curl_handle(void)
927927
*/
928928
curl_easy_setopt(result, CURLOPT_PROXY, "");
929929
} else if (curl_http_proxy) {
930-
#if LIBCURL_VERSION_NUM >= 0x071800
931930
if (starts_with(curl_http_proxy, "socks5h"))
932931
curl_easy_setopt(result,
933932
CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5_HOSTNAME);
@@ -940,7 +939,6 @@ static CURL *get_curl_handle(void)
940939
else if (starts_with(curl_http_proxy, "socks"))
941940
curl_easy_setopt(result,
942941
CURLOPT_PROXYTYPE, CURLPROXY_SOCKS4);
943-
#endif
944942
#if LIBCURL_VERSION_NUM >= 0x073400
945943
else if (starts_with(curl_http_proxy, "https")) {
946944
curl_easy_setopt(result, CURLOPT_PROXYTYPE, CURLPROXY_HTTPS);

0 commit comments

Comments
 (0)