ib          2003/07/31 05:14:01

  Modified:    src/webdav/client/src/org/apache/webdav/lib
                        WebdavSession.java
  Log:
  Use preemptive authentication to improve performance.
  
  Revision  Changes    Path
  1.30      +7 -5      
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.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- WebdavSession.java        15 Jul 2003 12:55:57 -0000      1.29
  +++ WebdavSession.java        31 Jul 2003 12:14:01 -0000      1.30
  @@ -67,6 +67,7 @@
   import org.apache.commons.httpclient.Credentials;
   import org.apache.commons.httpclient.HostConfiguration;
   import org.apache.commons.httpclient.HttpClient;
  +import org.apache.commons.httpclient.HttpState;
   import org.apache.commons.httpclient.UsernamePasswordCredentials;
   import org.apache.util.HttpURL;
   
  @@ -189,9 +190,10 @@
               String userName = httpURL.getUserName();
               if (userName != null && userName.length() > 0) {
                   String password = httpURL.getPassword();
  -                client.getState().setCredentials(null, httpURL.getHost(),
  +                HttpState clientState = client.getState();
  +                clientState.setCredentials(null, httpURL.getHost(),
                       new UsernamePasswordCredentials(userName, password));
  -
  +                clientState.setAuthenticationPreemptive(true);
               }
   
               if (proxyCredentials != null) {
  
  
  

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

Reply via email to