juergen     01/05/17 06:38:01

  Modified:    src/webdav/server/org/apache/slide/webdav/method
                        CopyMethod.java MoveMethod.java
  Log:
  if the host name was not localhost but rather an alias like xyz, the hostName was 
not stripped from the destinationUri, resulting in an incorrect destUri. It is OPEN to 
me, what happens if the host in the destUri is not an alias, but a different host?
  
  Revision  Changes    Path
  1.12      +9 -3      
jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/CopyMethod.java
  
  Index: CopyMethod.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/CopyMethod.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- CopyMethod.java   2001/05/15 11:29:23     1.11
  +++ CopyMethod.java   2001/05/17 13:37:51     1.12
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/CopyMethod.java,v
 1.11 2001/05/15 11:29:23 juergen Exp $
  - * $Revision: 1.11 $
  - * $Date: 2001/05/15 11:29:23 $
  + * $Header: 
/home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/CopyMethod.java,v
 1.12 2001/05/17 13:37:51 juergen Exp $
  + * $Revision: 1.12 $
  + * $Date: 2001/05/17 13:37:51 $
    *
    * ====================================================================
    *
  @@ -152,6 +152,12 @@
           if ((hostName != null) && (destinationUri.startsWith(hostName))) {
               destinationUri = destinationUri.substring(hostName.length());
           }
  +        
  +        if (destinationUri.indexOf(":") != (-1)) {
  +            destinationUri = destinationUri.substring(destinationUri.indexOf(":"));
  +        }
  +            
  +            
           
           if (destinationUri.startsWith(":")) {
               int firstSeparator = destinationUri.indexOf("/");
  
  
  
  1.11      +9 -3      
jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/MoveMethod.java
  
  Index: MoveMethod.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/MoveMethod.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- MoveMethod.java   2001/04/04 16:33:05     1.10
  +++ MoveMethod.java   2001/05/17 13:37:54     1.11
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/MoveMethod.java,v
 1.10 2001/04/04 16:33:05 juergen Exp $
  - * $Revision: 1.10 $
  - * $Date: 2001/04/04 16:33:05 $
  + * $Header: 
/home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/MoveMethod.java,v
 1.11 2001/05/17 13:37:54 juergen Exp $
  + * $Revision: 1.11 $
  + * $Date: 2001/05/17 13:37:54 $
    *
    * ====================================================================
    *
  @@ -149,6 +149,12 @@
               destinationUri = destinationUri.substring(hostName.length());
           }
           
  +        if (destinationUri.indexOf(":") != (-1)) {
  +            destinationUri = destinationUri.substring(destinationUri.indexOf(":"));
  +        }
  +            
  +            
  +            
           if (destinationUri.startsWith(":")) {
               int firstSeparator = destinationUri.indexOf("/");
               if (firstSeparator < 0) {
  
  
  

Reply via email to