You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by ol...@apache.org on 2012/02/27 22:44:50 UTC
svn commit: r1294348 - in
/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client:
AuthenticationStrategyImpl.java HttpAuthenticator.java
Author: olegk
Date: Mon Feb 27 21:44:50 2012
New Revision: 1294348
URL: http://svn.apache.org/viewvc?rev=1294348&view=rev
Log:
It is legal for AuthScheme to be null
Modified:
httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/AuthenticationStrategyImpl.java
httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/HttpAuthenticator.java
Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/AuthenticationStrategyImpl.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/AuthenticationStrategyImpl.java?rev=1294348&r1=1294347&r2=1294348&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/AuthenticationStrategyImpl.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/AuthenticationStrategyImpl.java Mon Feb 27 21:44:50 2012
@@ -245,17 +245,13 @@ class AuthenticationStrategyImpl impleme
if (authhost == null) {
throw new IllegalArgumentException("Host may not be null");
}
- if (authScheme == null) {
- throw new IllegalArgumentException("Auth scheme may not be null");
- }
if (context == null) {
throw new IllegalArgumentException("HTTP context may not be null");
}
AuthCache authCache = (AuthCache) context.getAttribute(ClientContext.AUTH_CACHE);
if (authCache != null) {
if (this.log.isDebugEnabled()) {
- this.log.debug("Removing from cache '" + authScheme.getSchemeName() +
- "' auth scheme for " + authhost);
+ this.log.debug("Clearing cached auth scheme for " + authhost);
}
authCache.remove(authhost);
}
Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/HttpAuthenticator.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/HttpAuthenticator.java?rev=1294348&r1=1294347&r2=1294348&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/HttpAuthenticator.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/HttpAuthenticator.java Mon Feb 27 21:44:50 2012
@@ -108,7 +108,7 @@ public class HttpAuthenticator {
case HANDSHAKE:
if (authScheme == null) {
this.log.debug("Auth scheme is null");
- authStrategy.authFailed(host, authState.getAuthScheme(), context);
+ authStrategy.authFailed(host, null, context);
authState.reset();
authState.setState(AuthProtocolState.FAILURE);
return false;