summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2017-12-28 14:08:50 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2017-12-28 14:08:50 -0800
commitfc4a226bf60be67bc3d574aeafe06d266f700d99 (patch)
treeb3c5bbc0c737d86604e4bb8ea6fb4d1b9f88a025
parentMerge branch 'ks/doc-previous-checkout' (diff)
parenthttp: support CURLPROXY_HTTPS (diff)
downloadtgif-fc4a226bf60be67bc3d574aeafe06d266f700d99.tar.xz
Merge branch 'ws/curl-http-proxy-over-https'
Git has been taught to support an https:// URL used for http.proxy when using recent versions of libcurl. * ws/curl-http-proxy-over-https: http: support CURLPROXY_HTTPS
-rw-r--r--http.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/http.c b/http.c
index 215bebef1b..32d33261c9 100644
--- a/http.c
+++ b/http.c
@@ -866,6 +866,11 @@ static CURL *get_curl_handle(void)
curl_easy_setopt(result,
CURLOPT_PROXYTYPE, CURLPROXY_SOCKS4);
#endif
+#if LIBCURL_VERSION_NUM >= 0x073400
+ else if (starts_with(curl_http_proxy, "https"))
+ curl_easy_setopt(result,
+ CURLOPT_PROXYTYPE, CURLPROXY_HTTPS);
+#endif
if (strstr(curl_http_proxy, "://"))
credential_from_url(&proxy_auth, curl_http_proxy);
else {