summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--methods/basehttp.cc2
-rwxr-xr-xtest/integration/test-authentication-basic4
2 files changed, 4 insertions, 2 deletions
diff --git a/methods/basehttp.cc b/methods/basehttp.cc
index 03409a8d4..1a3566479 100644
--- a/methods/basehttp.cc
+++ b/methods/basehttp.cc
@@ -847,6 +847,7 @@ bool BaseHttpMethod::Configuration(std::string Message) /*{{{*/
/*}}}*/
bool BaseHttpMethod::AddProxyAuth(URI &Proxy, URI const &Server) /*{{{*/
{
+ MaybeAddAuthTo(Proxy);
if (std::find(methodNames.begin(), methodNames.end(), "tor") != methodNames.end() &&
Proxy.User == "apt-transport-tor" && Proxy.Password.empty())
{
@@ -857,7 +858,6 @@ bool BaseHttpMethod::AddProxyAuth(URI &Proxy, URI const &Server) /*{{{*/
else
Proxy.Password = std::move(pass);
}
- // FIXME: should we support auth.conf for proxies?
return true;
}
/*}}}*/
diff --git a/test/integration/test-authentication-basic b/test/integration/test-authentication-basic
index e724e243e..d29b38256 100755
--- a/test/integration/test-authentication-basic
+++ b/test/integration/test-authentication-basic
@@ -95,7 +95,9 @@ rewritesourceslist "http://localhost:${APTHTTPPORT}"
msgmsg 'proxy to server basic auth'
webserverconfig 'aptwebserver::request::absolute' 'uri'
-export http_proxy="http://localhost:${APTHTTPPORT}"
+# using ip instead of localhost avoids picking up the auth for the repo
+# for the proxy as well as we serve them both over the same server…
+export http_proxy="http://127.0.0.1:${APTHTTPPORT}"
runtest "http://localhost:${APTHTTPPORT}"
unset http_proxy