Map proxyChallenges = AuthChallengeParser.parseChallenges(
method.getResponseHeaders(PROXY_AUTH_CHALLENGE));
if (proxyChallenges.isEmpty()) {
return false;
}
AuthScheme authscheme = null;
try {
authscheme = this.authProcessor.processChallenge(authstate, proxyChallenges);
} catch (AuthChallengeException e) {
if (LOG.isWarnEnabled()) {
LOG.warn(e.getMessage());
}
}
if (authscheme == null) {
return false;
}
HttpAuthRealm realm = new HttpAuthRealm(
conn.getProxyHost(), conn.getProxyPort(),
authscheme.getRealm(),
authscheme.getSchemeName());
if ((this.authProcess == AUTH_PROXY_REQUIRED) && (authscheme.isComplete())) {
// Already tried and failed
Credentials credentials = promptForProxyCredentials(
authscheme, method.getParams(), realm);
if (credentials == null) {
if (LOG.isInfoEnabled()) {