Bug 38900

Summary: Cannot save with WebDAV
Product: Lenya Reporter: renaud richardet <renaud.richardet>
Component: Default PublicationAssignee: Lenya Developers <dev>
Status: NEEDINFO ---    
Severity: normal    
Priority: P2    
Version: Trunk   
Target Milestone: 2.0.1   
Hardware: Other   
OS: other   
Attachments: unfied diff against trunk

Description renaud richardet 2006-03-08 22:43:30 UTC
Cannot save with WebDAV (cadaver)
Cannot dragndrop with WebDAV (WinXP Explorer)
Comment 1 renaud richardet 2006-03-08 22:45:09 UTC
Created attachment 17849 [details]
unfied diff against trunk

- fixes path to xsl (bxe module has been moved)
- fixes double slash (was added twice)
Comment 2 Thorsten Scherler 2006-03-09 12:26:42 UTC
I have applied the first part of the patch, but with the second part I have
understanding problems:

Index: src/modules/webdav/java/src/org/apache/lenya/cms/usecases/webdav/Put.java
===================================================================
--- src/modules/webdav/java/src/org/apache/lenya/cms/usecases/webdav/Put.java
(revision 383956)
+++ src/modules/webdav/java/src/org/apache/lenya/cms/usecases/webdav/Put.java
(working copy)
@@ -112,7 +112,7 @@
             String tempSourceUri = "context://lenya/pubs/" + pubId +
"/work/webdav/content/"
                     + doc.getArea() + "/" + path + ".tmp";
             tempSourceUri = tempSourceUri.substring("lenya://".length());
-            tempSourceUri = "context://" + tempSourceUri;
+            tempSourceUri = "context:" + tempSourceUri;
 
             try {
                 SourceUtil.copy(resolver, uploadSourceUri, tempSourceUri, true);

We are setting first the String tempSourceUri, then we substring it based on
lenya:// ??? to then put it together again, that does not compute for me. 

Can you explain why it is not just:
 String tempSourceUri = "context://lenya/pubs/" + pubId + /work/webdav/content/"
                    + doc.getArea() + "/" + path + ".tmp";             

or should this be actually:
String tempSourceUri = "context://lenya/pubs/" + pubId + "/work/webdav/content/"
                     + doc.getArea() + "/" + path + ".tmp";
             tempSourceUri = tempSourceUri.substring("context://".length());
             tempSourceUri = "lenya://" + tempSourceUri;

if so why not directly:
String tempSourceUri = "lenya://lenya/pubs/" + pubId + "/work/webdav/content/"
                     + doc.getArea() + "/" + path + ".tmp";

TIA for details.
Comment 3 renaud richardet 2006-03-09 15:00:02 UTC
(In reply to comment #2)
> if so why not directly:
> String tempSourceUri = "lenya://lenya/pubs/" + pubId + "/work/webdav/content/"
>                      + doc.getArea() + "/" + path + ".tmp";

Makes sense to me, actually. Maybe Doug would like to comment on that.
Thanks, Renaud