summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Cable <pc@pcable.net>2016-04-27 16:55:55 -0400
committerJulian Andres Klode <jak@debian.org>2016-05-10 20:48:04 +0200
commite4848fe0e8f124eb8221cd947e7564b25a1f6539 (patch)
treec4d3fa5768121e4b3edfeddfa40f14f77fc33dd4
parent4ad57118a8a0225b413de96dedc085e0594726a6 (diff)
refactored no_proxy code to work regardless of where https proxy is set
when using the https transport mechanism, $no_proxy is ignored if apt is getting it's proxy information from $https_proxy (as opposed to Acquire::https::Proxy somewhere in apt config). if the source of proxy information is Acquire::https::Proxy set in apt.conf (or apt.conf.d), then $no_proxy is honored. (cherry picked from commit 8707edd9e4684ed68856cd8eeff15ebd1e8c88ea)
-rw-r--r--methods/https.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/methods/https.cc b/methods/https.cc
index ac6d355ed..fc439bef8 100644
--- a/methods/https.cc
+++ b/methods/https.cc
@@ -187,13 +187,13 @@ void HttpsMethod::SetupProxy() /*{{{*/
if (UseProxy == "DIRECT")
return;
- if (UseProxy.empty() == false)
+ // Parse no_proxy, a comma (,) separated list of domains we don't want to use
+ // a proxy for so we stop right here if it is in the list
+ if (getenv("no_proxy") != 0 && CheckDomainList(ServerName.Host,getenv("no_proxy")) == true)
+ return;
+
+ if (UseProxy.empty() == true)
{
- // Parse no_proxy, a comma (,) separated list of domains we don't want to use
- // a proxy for so we stop right here if it is in the list
- if (getenv("no_proxy") != 0 && CheckDomainList(ServerName.Host,getenv("no_proxy")) == true)
- return;
- } else {
const char* result = getenv("https_proxy");
// FIXME: Fall back to http_proxy is to remain compatible with
// existing setups and behaviour of apt.conf. This should be