@@ -65,6 +65,13 @@
#define GIT_CURL_HAVE_CURL_SSLVERSION_TLSv1_0
#endif
+/**
+ * CURLOPT_PROXYHEADER was added in 7.37.0, released in May 2014.
+ */
+#if LIBCURL_VERSION_NUM >= 0x072500
+#define GIT_CURL_HAVE_CURLOPT_PROXYHEADER
+#endif
+
/**
* CURLOPT_PINNEDPUBLICKEY was added in 7.39.0, released in November
* 2014. CURLE_SSL_PINNEDPUBKEYNOTMATCH was added in that same version.
@@ -652,8 +652,12 @@ static void set_proxyauth_name_password(CURL *result)
curl_easy_setopt(result, CURLOPT_PROXYPASSWORD,
proxy_auth.password);
} else if (proxy_auth.authtype && proxy_auth.credential) {
+#ifdef GIT_CURL_HAVE_CURLOPT_PROXYHEADER
curl_easy_setopt(result, CURLOPT_PROXYHEADER,
http_append_auth_header(&proxy_auth, NULL));
+#else
+ warning(_("CURLOPT_PROXYHEADER not supported with cURL < 7.37.0"));
+#endif
}
}