Bug#759264: This change broke proxy support in apt for me
On Thu, Sep 11, 2014 at 04:59:42PM +0200, Michael Vogt wrote:
> Indeed, sorry for that. I attached a patch that should fix the issue by
> not running the auto-detect if the user already has a proxy set for
> the given specific host. This seems to be the most sensible option,
> autodetect everything that is not set explicitly already in the config.
I was about to try a patch to make sure it didn't clober the existing
config, which it appeared the code would do.
I agree that is sensible behaviour.
> diff --git a/apt-pkg/contrib/proxy.cc b/apt-pkg/contrib/proxy.cc
> index b58db84..9750f71 100644
> --- a/apt-pkg/contrib/proxy.cc
> +++ b/apt-pkg/contrib/proxy.cc
> @@ -26,6 +26,10 @@ bool AutoDetectProxy(URI &URL)
> // we support both http/https debug options
> bool Debug = _config->FindB("Debug::Acquire::"+URL.Access,false);
>
> + // the user already explicitly set a proxy for this host
> + if(_config->FindS("Acquire::"+URL.Access+"::proxy::"+URL.Host, "") != "")
> + return true;
> +
> // option is "Acquire::http::Proxy-Auto-Detect" but we allow the old
> // name without the dash ("-")
> std::string AutoDetectProxyCmd = _config->Find("Acquire::"+URL.Access+"::Proxy-Auto-Detect",
I can confirm that fixes the problem here as expected.
--
Len Sorensen
Reply to: