From: Junio C Hamano Date: Wed, 25 Feb 2015 23:40:12 +0000 (-0800) Subject: Merge branch 'tc/missing-http-proxyauth' X-Git-Tag: v2.4.0-rc0~90 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/90eea883fd86a272a32c7d5f363445776e0680e2?hp=--cc Merge branch 'tc/missing-http-proxyauth' We did not check the curl library version before using CURLOPT_PROXYAUTH feature that may not exist. * tc/missing-http-proxyauth: http: support curl < 7.10.7 --- 90eea883fd86a272a32c7d5f363445776e0680e2 diff --cc http.c index efdab09796,93768874b3..0153fb0b62 --- a/http.c +++ b/http.c @@@ -398,18 -295,13 +398,20 @@@ static CURL *get_curl_handle(void if (curl_ftp_no_epsv) curl_easy_setopt(result, CURLOPT_FTP_USE_EPSV, 0); +#ifdef CURLOPT_USE_SSL + if (curl_ssl_try) + curl_easy_setopt(result, CURLOPT_USE_SSL, CURLUSESSL_TRY); +#endif + if (curl_http_proxy) { curl_easy_setopt(result, CURLOPT_PROXY, curl_http_proxy); + #if LIBCURL_VERSION_NUM >= 0x070a07 curl_easy_setopt(result, CURLOPT_PROXYAUTH, CURLAUTH_ANY); + #endif } + set_curl_keepalive(result); + return result; }