You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by og...@apache.org on 2003/08/08 09:58:34 UTC
cvs commit: jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/auth HttpAuthenticator.java
oglueck 2003/08/08 00:58:34
Modified: httpclient/src/java/org/apache/commons/httpclient/auth
HttpAuthenticator.java
Log:
Fixes for previous patch
Contributed by Oleg Kalnichevski
Revision Changes Path
1.12 +6 -10 jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/auth/HttpAuthenticator.java
Index: HttpAuthenticator.java
===================================================================
RCS file: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/auth/HttpAuthenticator.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- HttpAuthenticator.java 8 Aug 2003 06:47:43 -0000 1.11
+++ HttpAuthenticator.java 8 Aug 2003 07:58:33 -0000 1.12
@@ -305,10 +305,6 @@
}
}
String realm = authscheme.getRealm();
- // TODO: To be removed in the future. Required for backward compatibility
- if (realm == null) {
- realm = host;
- }
if (LOG.isDebugEnabled()) {
StringBuffer buffer = new StringBuffer();
buffer.append("Authenticating with the ");
@@ -316,7 +312,7 @@
buffer.append("default");
} else {
buffer.append('\'');
- buffer.append(authscheme.getRealm());
+ buffer.append(realm);
buffer.append('\'');
}
buffer.append(" authentication realm at ");
@@ -327,8 +323,8 @@
? state.getProxyCredentials(realm, host)
: state.getCredentials(realm, host);
if (credentials == null) {
- throw new AuthenticationException(
- "No credentials available for the '" + authscheme.getRealm()
+ throw new CredentialsNotAvailableException(
+ "No credentials available for the '" + realm
+ "' authentication realm at " + host);
}
String auth = authscheme.authenticate(credentials, method.getName(), method.getPath());
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org