Re: [PATCH] http: support CURLPROXY_HTTPS
- From
Jonathan Nieder <jrnieder@gmail.com>
- Date
- Dec 19, 2017, 21:50 UTC
- Message-ID
- <20171219215031.GE240141@aiede.mtv.corp.google.com>
- In-Reply-To
- <xmqq7etiv1n5.fsf@gitster.mtv.corp.google.com>
Junio C Hamano wrote:
> Jonathan Nieder <jrnieder@gmail.com> writes: >> Wei Shuyu wrote:
Show 17 quoted lines
>>> diff --git a/http.c b/http.c >>> index 215bebef1..32d33261c 100644 >>> --- a/http.c >>> +++ b/http.c >>> @@ -865,6 +865,11 @@ static CURL *get_curl_handle(void) >>> else if (starts_with(curl_http_proxy, "socks")) >>> curl_easy_setopt(result, >>> CURLOPT_PROXYTYPE, CURLPROXY_SOCKS4); >>> +#endif >>> +#if LIBCURL_VERSION_NUM >= 0x073400 >> >> Can this use #ifdef CURLPROXY_HTTPS instead? That way, if someone's >> copy of curl has backported support then they get the benefit of this >> change as well. > > It sounds like a worthwhile thing to do (assuming that these are > always implemented as preprocessor macros).
Oh, good point! It's an enumerator, not a preprocessor macro. But there is a preprocessor macro CURL_VERSION_HTTPS_PROXY.
Anyway, using LIBCURL_VERSION_NUM is consistent with the surrounding code.
Thanks, Jonathan