Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge branch 'jx/http-no-proxy'
* jx/http-no-proxy:
  http: honor no_http env variable to bypass proxy
  • Loading branch information
Junio C Hamano committed Mar 10, 2016
2 parents e80aae5 + d445fda commit f4a48e8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions http.c
Expand Up @@ -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;
Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit f4a48e8

Please sign in to comment.