summaryrefslogtreecommitdiff
path: root/methods/https.cc
diff options
context:
space:
mode:
authorMichael Vogt <mvo@ubuntu.com>2014-09-02 15:50:19 +0200
committerMichael Vogt <mvo@ubuntu.com>2014-09-02 16:02:37 +0200
commitc6ee61eab54edf6cc3fbe118d304d72a860e1451 (patch)
tree8ca7fdffd4bc257fd5f90bbb3941e1ff351cca9c /methods/https.cc
parentfb4c76436a88a04d1d9b7e9622e431ed8ab708a6 (diff)
Make Proxy-Auto-Detect check for each host
When doing Acquire::http{,s}::Proxy-Auto-Detect, run the auto-detect command for each host instead of only once. This should make using "proxy" from libproxy-tools feasible which can then be used for PAC style or other proxy configurations. Closes: #759264
Diffstat (limited to 'methods/https.cc')
-rw-r--r--methods/https.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/methods/https.cc b/methods/https.cc
index e0348ab58..0499af0c5 100644
--- a/methods/https.cc
+++ b/methods/https.cc
@@ -20,6 +20,7 @@
#include <apt-pkg/configuration.h>
#include <apt-pkg/macros.h>
#include <apt-pkg/strutl.h>
+#include <apt-pkg/proxy.h>
#include <sys/stat.h>
#include <sys/time.h>
@@ -107,6 +108,9 @@ void HttpsMethod::SetupProxy() /*{{{*/
{
URI ServerName = Queue->Uri;
+ // Determine the proxy setting
+ AutoDetectProxy(ServerName);
+
// Curl should never read proxy settings from the environment, as
// we determine which proxy to use. Do this for consistency among
// methods and prevent an environment variable overriding a