Consider the following piece of code: String uploadDir = "/home/mavila/temp"; String uploadFile = "globalSettings.xml"; webdavModule.put(uploadDir,uploadFile,"files/globalSettings.xml?param1=value1¶m2=value2"); String mycopyFile = "files/globalSettingsCOPY.xml"; webdavModule.copy("files/globalSettings.xml?param1=value1¶m2=value2",mycopyFile); Everything works fine for the put method, all after the "?" is ignored and is just stored the file, in this case "globalSettings.xml". Now, we try to use the copy method with the same parameters, in this case the server believes that the file is the complete string with the parameters, as far as I can see this is not consistent. I have debugged the code, seems that in class org.apache.slide.webdav.method.CopyMethod this is is called .. macro.copy(slideToken, sourceUri, destinationUri, macroParameters, this, this, null, this); ... I don't know very much the architecture of the server, I have not had time to see a class diagram but before calling the method copy a clean up of the sourceUri and destinationUri should be done.
Created attachment 15071 [details] Added new method Added a method to clean a String from query parameters
Created attachment 15072 [details] added the call to the methods Added these statements that use the method implemented in WebdavUtils, this works for me, should be merged in the code and tested. sourceUri = WebdavUtils.cleanParameterString(sourceUri); destinationUri = WebdavUtils.cleanParameterString(destinationUri);
Also the move method does not clean the sourceUri and destinationUri, in copyMethod.java I have moved the calls to clean the string at the top of the executeRequest method and also implemented in the moveMethod as well, I will attache the two file.
Created attachment 15079 [details] cleans the sourceUri and destinationUri from query parameters Added at the top of executeRequest method
Created attachment 15080 [details] cleans sourceUri and destinationUri from query parameters cleans sourceUri and destinationUri from query parameters, it is implemented in the top of method executeRequest