From c3f74c968d12e739b7bc4d7e43704c7c9c8e8170 Mon Sep 17 00:00:00 2001 From: Patrick Cable Date: Wed, 27 Apr 2016 14:15:24 -0400 Subject: [PATCH] Fix no_proxy support if proxy info pulled from https_proxy --- methods/https.cc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/methods/https.cc b/methods/https.cc index ac6d355..019730b 100644 --- a/methods/https.cc +++ b/methods/https.cc @@ -202,7 +202,15 @@ void HttpsMethod::SetupProxy() /*{{{*/ // should Apt. if (result == NULL) result = getenv("http_proxy"); - UseProxy = result == NULL ? "" : result; + + // Users will expect no_proxy to work whether they set proxy in + // apt.conf.d or on the command line. Previously, no_proxy would + // be ignored if http_proxy or https_proxy was set. + if (getenv("no_proxy") != 0 && CheckDomainList(ServerName.Host,getenv("no_proxy")) == true) { + return; + } else { + UseProxy = result == NULL ? "" : result; + } } // Determine what host and port to use based on the proxy settings -- 2.4.5