Bug 26906 - Unable to do operations like Rename/Move, Copy, Paste etc.
Summary: Unable to do operations like Rename/Move, Copy, Paste etc.
Status: RESOLVED FIXED
Alias: None
Product: Tomcat 5
Classification: Unclassified
Component: Servlets:WebDAV (show other bugs)
Version: 5.0.18
Hardware: PC other
: P3 major (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
: 27595 28399 28591 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-02-13 08:41 UTC by Sudhan
Modified: 2004-11-16 19:05 UTC (History)
3 users (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sudhan 2004-02-13 08:41:25 UTC
Could not do common operations like Rename/Move, Copy, Paste from Windows 2000 /
NT with IE 6.0.2600
Tried to do similar operations from DAVExplorer-0.90 and failed.
When probing further, I found some problem with identifying the destination
location for the operations.
Applied the attached patch to the src code (from the src tar not the CVS) and it
now works on both tools.

<PATCH>
--- WebdavServlet.java.orig	Thu Jan 15 22:59:32 2004
+++ WebdavServlet.java	Fri Feb 13 11:10:41 2004
@@ -1506,8 +1506,15 @@
 
         destinationPath = 
             normalize(RequestUtil.URLDecode(destinationPath, "UTF8"));
-
-        int protocolIndex = destinationPath.indexOf("://");
+        int protocolIndex = destinationPath.indexOf(":/");
+        if( protocolIndex >= 0 ) {
+            if( destinationPath.charAt(protocolIndex+2) != '/' ) {
+                // add a / to make it look good
+                destinationPath = destinationPath.substring(0,
protocolIndex)+"://"+
+                destinationPath.substring(protocolIndex+2);
+            }
+        }
+        protocolIndex = destinationPath.indexOf("://");
         if (protocolIndex >= 0) {
             // if the Destination URL contains the protocol, we can safely
             // trim everything upto the first "/" character after "://"
</PATCH>
Comment 1 Remy Maucherat 2004-02-13 09:01:25 UTC
I don't think I can agree to this change: it looks to me like a very ugly hack.
Comment 2 Mark Thomas 2004-02-13 20:12:13 UTC
I have just committed an alternative patch to CVS that fixes this issue. This 
will be included in the next release.

Many thanks.
Comment 3 Mark Thomas 2004-03-11 18:58:35 UTC
*** Bug 27595 has been marked as a duplicate of this bug. ***
Comment 4 Mark Thomas 2004-04-15 18:18:45 UTC
*** Bug 28399 has been marked as a duplicate of this bug. ***
Comment 5 Mark Thomas 2004-04-26 22:39:46 UTC
*** Bug 28591 has been marked as a duplicate of this bug. ***