commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject cvs commit: jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/auth HttpAuthenticator.java
Date Fri, 11 Jun 2004 18:55:32 GMT
olegk       2004/06/11 11:55:32

  Modified:    httpclient/src/java/org/apache/commons/httpclient Tag:
                        HTTPCLIENT_2_0_BRANCH HttpMethodBase.java
               httpclient/src/java/org/apache/commons/httpclient/auth Tag:
                        HTTPCLIENT_2_0_BRANCH HttpAuthenticator.java
  Log:
  PR #29439 (Credentials ignored if realm specified in preemptive authentication)
  
  Provides extra warning logs in case of preemptive authentication failure due to missing
default credentials
  
  Contributed by Oleg Kalnichevski
  Reviewed by Michael Becke, Ortwin Glueck
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.159.2.27 +9 -5      jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpMethodBase.java
  
  Index: HttpMethodBase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpMethodBase.java,v
  retrieving revision 1.159.2.26
  retrieving revision 1.159.2.27
  diff -u -r1.159.2.26 -r1.159.2.27
  --- HttpMethodBase.java	13 Apr 2004 18:24:03 -0000	1.159.2.26
  +++ HttpMethodBase.java	11 Jun 2004 18:55:31 -0000	1.159.2.27
  @@ -99,7 +99,7 @@
    * @author <a href="mailto:dion@apache.org">dIon Gillard</a>
    * @author <a href="mailto:jsdever@apache.org">Jeff Dever</a>
    * @author <a href="mailto:dims@apache.org">Davanum Srinivas</a>
  - * @author Ortwin Gl├╝ck
  + * @author Ortwin Glueck
    * @author Eric Johnson
    * @author Michael Becke
    * @author <a href="mailto:oleg@ural.ru">Oleg Kalnichevski</a>
  @@ -1029,10 +1029,14 @@
                   try {
                       if (HttpAuthenticator.authenticateDefault(this, conn, state)) {
                           LOG.debug("Default basic credentials applied");
  +                    } else {
  +                        LOG.warn("Preemptive authentication failed");
                       }
                       if (conn.isProxied()) {
                           if (HttpAuthenticator.authenticateProxyDefault(this, conn, state))
{
                               LOG.debug("Default basic proxy credentials applied");
  +                        } else {
  +                            LOG.warn("Preemptive proxy authentication failed");
                           }
                       }
                   } catch (AuthenticationException e) {
  
  
  
  No                   revision
  No                   revision
  1.7.2.4   +6 -3      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.7.2.3
  retrieving revision 1.7.2.4
  diff -u -r1.7.2.3 -r1.7.2.4
  --- HttpAuthenticator.java	22 Feb 2004 18:21:15 -0000	1.7.2.3
  +++ HttpAuthenticator.java	11 Jun 2004 18:55:32 -0000	1.7.2.4
  @@ -166,6 +166,9 @@
           Credentials credentials = proxy 
               ? state.getProxyCredentials(null, host) : state.getCredentials(null, host);
           if (credentials == null) {
  +            if (LOG.isWarnEnabled()) {
  +                LOG.warn("Default credentials for " + host + " not available");
  +            }
               return false;
           }
           if (!(credentials instanceof UsernamePasswordCredentials)) {
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message