ozeigermann    2004/04/19 02:32:43

  Modified:    webdavclient/clientlib/src/java/org/apache/webdav/lib/methods
                        XMLResponseMethodBase.java
               webdavclient/commandline/src/java/org/apache/webdav/cmd
                        Client.java
  Log:
  Applied patch by Thomas Bernert to address issue #28463
  
  Revision  Changes    Path
  1.8       +11 -7     
jakarta-slide/webdavclient/clientlib/src/java/org/apache/webdav/lib/methods/XMLResponseMethodBase.java
  
  Index: XMLResponseMethodBase.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-slide/webdavclient/clientlib/src/java/org/apache/webdav/lib/methods/XMLResponseMethodBase.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- XMLResponseMethodBase.java        19 Apr 2004 07:59:10 -0000      1.7
  +++ XMLResponseMethodBase.java        19 Apr 2004 09:32:43 -0000      1.8
  @@ -387,7 +387,7 @@
               responseHashtable = new Hashtable();
               responseURLs = new Vector();
               int status = getStatusLine().getStatusCode();
  -
  +           
               // Also accept OK sent by buggy servers in reply to a PROPFIND
               // or REPORT (Xythos, Catacomb, ...?).
               if (status == WebdavStatus.SC_MULTI_STATUS
  @@ -395,9 +395,13 @@
                       || this instanceof ReportMethod)
                       && status == HttpStatus.SC_OK) {
   
  -                Element multistatus =
  -                    getResponseDocument().getDocumentElement();
  -                NodeList list = multistatus.getChildNodes();
  +                Document rdoc = getResponseDocument();
  +
  +                NodeList list = null;
  +                if (rdoc != null) {
  +                    Element multistatus = 
getResponseDocument().getDocumentElement();
  +                    list = multistatus.getChildNodes();
  +                }
                   if (list != null) {
                       for (int i = 0; i < list.getLength(); i++) {
                           try {
  
  
  
  1.10      +14 -3     
jakarta-slide/webdavclient/commandline/src/java/org/apache/webdav/cmd/Client.java
  
  Index: Client.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-slide/webdavclient/commandline/src/java/org/apache/webdav/cmd/Client.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- Client.java       14 Apr 2004 13:29:52 -0000      1.9
  +++ Client.java       19 Apr 2004 09:32:43 -0000      1.10
  @@ -598,6 +598,8 @@
   
       void cd(String path)
       {
  +     String currentPath = webdavResource.getPath();
  +     
           try {
               String cdPath = checkUri(path + "/");
               webdavResource.setPath(cdPath);
  @@ -606,14 +608,23 @@
                       setPath(webdavResource.getPath());
                   } else {
                       out.println("Warning: Not a collection");
  +                    webdavResource.setPath(currentPath);
                   }
               } else {
                   out.println("Warning: Not found the path");
  +                webdavResource.setPath(currentPath);
               }
           }
           catch (Exception ex) {
               handleException(ex);
  +            
  +            try {
  +                webdavResource.setPath(currentPath);
  +            } catch (Exception e) {
  +                handleException(ex);
  +            }
           }
  +        
           updatePrompt(getPath());
       }
   
  
  
  

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

Reply via email to