remm        01/07/22 12:27:57

  Modified:    httpclient/src/java/org/apache/commons/httpclient
                        HttpClient.java
  Log:
  - Don't override the state if a state is already associated with the client. That
    allows extending the state token.
  
  Revision  Changes    Path
  1.18      +9 -6      
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.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- HttpClient.java   2001/07/16 18:14:14     1.17
  +++ HttpClient.java   2001/07/22 19:27:57     1.18
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpClient.java,v
 1.17 2001/07/16 18:14:14 remm Exp $
  - * $Revision: 1.17 $
  - * $Date: 2001/07/16 18:14:14 $
  + * $Header: 
/home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpClient.java,v
 1.18 2001/07/22 19:27:57 remm Exp $
  + * $Revision: 1.18 $
  + * $Date: 2001/07/22 19:27:57 $
    *
    * ====================================================================
    *
  @@ -633,7 +633,8 @@
        */
       public void startSession() {
   
  -        state = new State();
  +        if (state == null)
  +            state = new State();
           this.sessionHost = "localhost";
           this.sessionPort = 80;
           this.https = false;
  @@ -658,7 +659,8 @@
                                  + " Port:" + port
                                  + " HTTPS:" + https);
   
  -        state = new State();
  +        if (state == null)
  +            state = new State();
           this.sessionHost = host;
           this.sessionPort = port;
           this.https = https;
  @@ -685,7 +687,8 @@
                                   + " Credentials:" + creds
                                   + " HTTPS:" + https);
           setCredentials(creds);
  -        state = new State();
  +        if (state == null)
  +            state = new State();
           this.sessionHost = host;
           this.sessionPort = port;
           this.https = https;
  
  
  

Reply via email to