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 HttpState.java
Date Mon, 20 Dec 2004 11:50:55 GMT
olegk       2004/12/20 03:50:55

  Modified:    httpclient/src/java/org/apache/commons/httpclient
                        HttpState.java
  Log:
  PR #32409 (HttpState should have methods for clearing all cookies and credentials)
  
  Contributed by Oleg Kalnichevski
  Reviewed by Michael Becke
  
  Revision  Changes    Path
  1.38      +34 -4     jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpState.java
  
  Index: HttpState.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpState.java,v
  retrieving revision 1.37
  retrieving revision 1.38
  diff -u -r1.37 -r1.38
  --- HttpState.java	22 Sep 2004 23:36:10 -0000	1.37
  +++ HttpState.java	20 Dec 2004 11:50:54 -0000	1.38
  @@ -592,4 +592,34 @@
           }
           return sbResult.toString();
       }
  +    
  +    /**
  +     * Clears all credentials.
  +     */
  +    public void clearCredentials() {
  +        this.credMap.clear();
  +    }
  +    
  +    /**
  +     * Clears all proxy credentials.
  +     */
  +    public void clearProxyCredentials() {
  +        this.proxyCred.clear();
  +    }
  +    
  +    /**
  +     * Clears all cookies.
  +     */
  +    public void clearCookies() {
  +        this.cookies.clear();
  +    }
  +    
  +    /**
  +     * Clears the state information (all cookies, credentials and proxy credentials).
  +     */
  +    public void clear() {
  +        clearCookies();
  +        clearCredentials();
  +        clearProxyCredentials();
  +    }
   }
  
  
  

---------------------------------------------------------------------
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