ib          2003/07/15 05:55:57

  Modified:    src/webdav/client/src/org/apache/webdav/lib
                        WebdavSession.java
  Log:
  Account for changes in Commons-HttpClient
  
  Revision  Changes    Path
  1.29      +8 -16     
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.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- WebdavSession.java        4 Apr 2003 15:25:20 -0000       1.28
  +++ WebdavSession.java        15 Jul 2003 12:55:57 -0000      1.29
  @@ -176,10 +176,7 @@
       public HttpClient getSessionInstance(HttpURL httpURL, boolean reset)
           throws IOException {
   
  -        String authority = httpURL.getAuthority();
  -        if (reset)
  -            client = null;
  -        if (client == null) {
  +        if (reset || client == null) {
               client = new HttpClient();
               // Set a state which allows lock tracking
               client.setState(new WebdavState());
  @@ -192,13 +189,14 @@
               String userName = httpURL.getUserName();
               if (userName != null && userName.length() > 0) {
                   String password = httpURL.getPassword();
  -                client.getState().setCredentials(null,
  +                client.getState().setCredentials(null, httpURL.getHost(),
                       new UsernamePasswordCredentials(userName, password));
   
               }
   
               if (proxyCredentials != null) {
  -                client.getState().setProxyCredentials(null, proxyCredentials);
  +                client.getState().setProxyCredentials(null, proxyHost,
  +                                                      proxyCredentials);
               }
           }
   
  @@ -225,17 +223,11 @@
       /**
        * Close an session and delete the connection information.
        *
  -     * @param client The HttpClient instance.
        * @exception IOException Error in closing socket.
        */
       public void closeSession()
           throws IOException {
  -        if (this.client!=null) {
  -            this.client.endSession();
  -            // Remove the progress listener.
  -            // webdavClient.getProgressUtil().addProgressListener(this);
  -            this.client = null;
  -        }
  +        this.client = null;
       }
   
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to