diff options
author | Junio C Hamano <gitster@pobox.com> | 2016-03-10 10:56:43 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-03-10 10:56:43 -0800 |
commit | f4a48e870892b18a7205c9315821e4b6a831ade4 (patch) | |
tree | 57d3953f22d98f1fd757d9c26db4fb7b77e7d29c /http.c | |
parent | e80aae51f2be908e37fca47ea0dff6d7861c8497 (diff) | |
parent | d445fda44dbf031dccdfd384b2418ea50988a756 (diff) | |
download | git-f4a48e870892b18a7205c9315821e4b6a831ade4.tar.gz |
Merge branch 'jx/http-no-proxy'
* jx/http-no-proxy:
http: honor no_http env variable to bypass proxy
Diffstat (limited to 'http.c')
-rw-r--r-- | http.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -70,6 +70,7 @@ static long curl_low_speed_limit = -1; static long curl_low_speed_time = -1; static int curl_ftp_no_epsv; static const char *curl_http_proxy; +static const char *curl_no_proxy; static const char *http_proxy_authmethod; static struct { const char *name; @@ -624,6 +625,11 @@ static CURL *get_curl_handle(void) } curl_easy_setopt(result, CURLOPT_PROXY, proxy_auth.host); +#if LIBCURL_VERSION_NUM >= 0x071304 + var_override(&curl_no_proxy, getenv("NO_PROXY")); + var_override(&curl_no_proxy, getenv("no_proxy")); + curl_easy_setopt(result, CURLOPT_NOPROXY, curl_no_proxy); +#endif } init_curl_proxy_auth(result); |