jericho     01/05/15 10:29:26

  Modified:    src/webdav/client/src/org/apache/webdav/lib
                        WebdavSession.java
  Log:
  - Limit the debug mode of the connection interceptor with level 9.
  - Do not save the session automatically.
     It's recommened the session to be closed normally and get a new instance.
  
  Revision  Changes    Path
  1.11      +14 -20    
jakarta-slide/src/webdav/client/src/org/apache/webdav/lib/WebdavSession.java
  
  Index: WebdavSession.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-slide/src/webdav/client/src/org/apache/webdav/lib/WebdavSession.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- WebdavSession.java        2001/05/11 22:52:49     1.10
  +++ WebdavSession.java        2001/05/15 17:29:16     1.11
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-slide/src/webdav/client/src/org/apache/webdav/lib/WebdavSession.java,v
 1.10 2001/05/11 22:52:49 jericho Exp $
  - * $Revision: 1.10 $
  - * $Date: 2001/05/11 22:52:49 $
  + * $Header: 
/home/cvs/jakarta-slide/src/webdav/client/src/org/apache/webdav/lib/WebdavSession.java,v
 1.11 2001/05/15 17:29:16 jericho Exp $
  + * $Revision: 1.11 $
  + * $Date: 2001/05/15 17:29:16 $
    *
    * ====================================================================
    *
  @@ -187,7 +187,7 @@
        * @param client The Http client instance.
        * @exception IOException
        */
  -    public synchronized void setSession(HttpClient client)
  +    protected synchronized void setSession(HttpClient client)
           throws IOException {
           
           HttpURL httpURL =
  @@ -285,7 +285,7 @@
        * Connect.
        */
       public void connect() {
  -        if (debug > 9) {
  +        if (debug == 9) {
               System.err.println("CLIENT: connected.");
           }
       }
  @@ -295,7 +295,7 @@
        * Disconnect.
        */
       public void disconnect() {
  -        if (debug > 9) {
  +        if (debug == 9) {
               System.err.println("CLIENT: disconnected.");
           }
       }
  @@ -307,7 +307,7 @@
        * @return boolean true if a retry should be attempted
        */
       public boolean retry(int status) {
  -        if (debug > 9) {
  +        if (debug == 9) {
               System.err.println("CLIENT: retrying.");
           }
           return false;
  @@ -320,7 +320,7 @@
        * @return boolean true if a retry should be attempted
        */
       public boolean info(int status, Hashtable headers) {
  -        if (debug > 9) {
  +        if (debug == 9) {
               System.err.println("CLIENT: Status: " + status + "\nHeaders: ");
               Enumeration keys = headers.keys();
               while (keys.hasMoreElements()) {
  @@ -342,7 +342,7 @@
        * @return boolean true if processing of the request should be stopped
        */
       public boolean error(int status, Exception e) {
  -        if (debug > 9) {
  +        if (debug == 9) {
               System.err.println("CLIENT: Status: " + status + ", Exception: " +
                                  e.getMessage());
           }
  @@ -354,7 +354,7 @@
        * Sent request.
        */
       public void sentRequest() {
  -        if (debug > 9) {
  +        if (debug == 9) {
               System.err.println("CLIENT: sent request.");
           }
       }
  @@ -364,7 +364,7 @@
        * Recieved response.
        */
       public void recievedResponse() {
  -        if (debug > 9) {
  +        if (debug == 9) {
               System.err.println("CLIENT: recieved response.");
           }
       }
  @@ -374,7 +374,7 @@
        * Recieved expectation.
        */
       public void recievedExpectation() {
  -        if (debug > 9) {
  +        if (debug == 9) {
               System.err.println("CLIENT: recieved expectation.");
           }
       }
  @@ -384,7 +384,7 @@
        * Authenticate.
        */
       public void requiredAuthentication() {
  -        if (debug > 9) {
  +        if (debug == 9) {
               System.err.println("CLIENT: required authentication.");
           }
       }
  @@ -394,14 +394,8 @@
        * Authenticate.
        */
       public void authenticate() {
  -        if (debug > 9) {
  +        if (debug == 9) {
               System.err.println("CLIENT: authenticating.");
  -        }
  -        try {
  -            if (client != null) {
  -                setSession(client);
  -            }
  -        } catch (IOException e) {
           }
       }
   
  
  
  

Reply via email to