Merge branch 'tc/missing-http-proxyauth'
authorJunio C Hamano <gitster@pobox.com>
Wed, 25 Feb 2015 23:40:12 +0000 (15:40 -0800)
committerJunio C Hamano <gitster@pobox.com>
Wed, 25 Feb 2015 23:40:12 +0000 (15:40 -0800)
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

1  2 
http.c
diff --cc http.c
index efdab0979692153f016bdf1fdb1a2e782738f1bc,93768874b39246549307098667a449ac31755ea9..0153fb0b626d1fc28eba1bece2406b64fcaa0ecb
--- 1/http.c
--- 2/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;
  }