summaryrefslogtreecommitdiff
path: root/http.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-12-28 22:08:50 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-12-28 22:08:50 (GMT)
commitfc4a226bf60be67bc3d574aeafe06d266f700d99 (patch)
treeb3c5bbc0c737d86604e4bb8ea6fb4d1b9f88a025 /http.c
parentf53edaf2d5983f82ffb513e10569bbfbe540613d (diff)
parent82b6803aeec62489977b98804b0a18396d3c6ebf (diff)
downloadgit-fc4a226bf60be67bc3d574aeafe06d266f700d99.zip
git-fc4a226bf60be67bc3d574aeafe06d266f700d99.tar.gz
git-fc4a226bf60be67bc3d574aeafe06d266f700d99.tar.bz2
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
Diffstat (limited to 'http.c')
-rw-r--r--http.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/http.c b/http.c
index 215bebe..32d3326 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 {