jericho     01/05/11 15:04:26

  Modified:    httpclient/src/java/org/apache/commons/httpclient
                        HttpClient.java ConnectionInterceptor.java
  Log:
  - Subdivide authentication.
  
  Revision  Changes    Path
  1.11      +12 -8     
jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpClient.java
  
  Index: HttpClient.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpClient.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- HttpClient.java   2001/05/11 21:42:48     1.10
  +++ HttpClient.java   2001/05/11 22:04:19     1.11
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpClient.java,v
 1.10 2001/05/11 21:42:48 jericho Exp $
  - * $Revision: 1.10 $
  - * $Date: 2001/05/11 21:42:48 $
  + * $Header: 
/home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpClient.java,v
 1.11 2001/05/11 22:04:19 jericho Exp $
  + * $Revision: 1.11 $
  + * $Date: 2001/05/11 22:04:19 $
    *
    * ====================================================================
    *
  @@ -462,7 +462,7 @@
                       state.setAuthenticateToken
                           (authenticateChallenge.getValue());
                       if (connectionInterceptor != null) {
  -                        connectionInterceptor.authenticate();
  +                        connectionInterceptor.requiredAuthentication();
                       }
                   }
                   
  @@ -812,12 +812,16 @@
   
               String challengeResponse = Authenticator.challengeResponse
                   (state, credentials);
  -            if (debug > 1)
  -                System.out.print("Authorization: "
  -                                 + challengeResponse + "\r\n");
  -            if (challengeResponse != null)
  +            if (challengeResponse != null) {
  +                if (debug > 1)
  +                    System.out.print("Authorization: "
  +                                     + challengeResponse + "\r\n");
                   output.write(("Authorization: "
                                 + challengeResponse + "\r\n").getBytes());
  +                if (connectionInterceptor != null) {
  +                    connectionInterceptor.authenticate();
  +                }
  +            }
   
           }
   
  
  
  
  1.2       +8 -2      
jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/ConnectionInterceptor.java
  
  Index: ConnectionInterceptor.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/ConnectionInterceptor.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ConnectionInterceptor.java        2001/04/25 18:42:50     1.1
  +++ ConnectionInterceptor.java        2001/05/11 22:04:21     1.2
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/ConnectionInterceptor.java,v
 1.1 2001/04/25 18:42:50 remm Exp $
  - * $Revision: 1.1 $
  - * $Date: 2001/04/25 18:42:50 $
  + * $Header: 
/home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/ConnectionInterceptor.java,v
 1.2 2001/05/11 22:04:21 jericho Exp $
  + * $Revision: 1.2 $
  + * $Date: 2001/05/11 22:04:21 $
    *
    * ====================================================================
    *
  @@ -138,6 +138,12 @@
        * Recieved expectation.
        */
       public void recievedExpectation();
  +
  +
  +    /**
  +     * Required authentication.
  +     */
  +    public void requiredAuthentication();
   
   
       /**
  
  
  

Reply via email to