SystemDefaultCredentialsProvider doesn't specify RequestorType.PROXY for proxy authentication requests (follow-up)

git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1529435 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Oleg Kalnichevski 2013-10-05 11:22:15 +00:00
parent 4282ad94e3
commit 922d442ce9
1 changed files with 6 additions and 1 deletions

View File

@ -103,7 +103,12 @@ public class SystemDefaultCredentialsProvider implements CredentialsProvider {
return localcreds;
}
if (authscope.getHost() != null) {
final PasswordAuthentication systemcreds = getSystemCreds(authscope, null);
PasswordAuthentication systemcreds = getSystemCreds(
authscope, Authenticator.RequestorType.SERVER);
if (systemcreds == null) {
systemcreds = getSystemCreds(
authscope, Authenticator.RequestorType.PROXY);
}
if (systemcreds != null) {
return new UsernamePasswordCredentials(
systemcreds.getUserName(), new String(systemcreds.getPassword()));