commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From oglu...@apache.org
Subject cvs commit: jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/auth HttpAuthenticator.java
Date Fri, 08 Aug 2003 07:58:34 GMT
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());
  
  
  

Mime
View raw message