remm 00/11/13 18:05:20
Modified: catalina/src/share/org/apache/catalina/servlets
WebdavServlet.java
Log:
- Fix two bugs found using Adobe GoLive 5 :
* The lock scope was incorrectly parsed. It could be a cut and paste bug,
since the fix was already present in the original Slide code
* "/" was sometimes incorrectly appended to a path when generating href
elements
- Lock functionality doesn't work yet with GoLive, since it doesn't like that I
obsfucate the lock token (and even crashes if I don't specify a locktoken
element, which I'm allowed to do according to the DTD). I'll add a
workaround, since some other clients may not like this. What will happen
is that a user will be able to access the locktoken of the locks that he has
set (so that he can steal his own locks using another WebDAV enabled
application, which can prove to be useful).
Revision Changes Path
1.6 +8 -6
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/WebdavServlet.java
Index: WebdavServlet.java
===================================================================
RCS file:
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/WebdavServlet.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- WebdavServlet.java 2000/11/09 07:22:22 1.5
+++ WebdavServlet.java 2000/11/14 02:05:20 1.6
@@ -1,7 +1,7 @@
/*
- * $Header:
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/WebdavServlet.java,v
1.5 2000/11/09 07:22:22 remm Exp $
- * $Revision: 1.5 $
- * $Date: 2000/11/09 07:22:22 $
+ * $Header:
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/WebdavServlet.java,v
1.6 2000/11/14 02:05:20 remm Exp $
+ * $Revision: 1.6 $
+ * $Date: 2000/11/14 02:05:20 $
*
* ====================================================================
*
@@ -121,7 +121,7 @@
* are handled by the DefaultServlet.
*
* @author Remy Maucherat
- * @version $Revision: 1.5 $ $Date: 2000/11/09 07:22:22 $
+ * @version $Revision: 1.6 $ $Date: 2000/11/14 02:05:20 $
*/
public class WebdavServlet
@@ -828,8 +828,8 @@
case Node.ELEMENT_NODE:
String tempScope = currentNode.getNodeName();
if (tempScope.indexOf(':') != -1) {
- lock.scope =
- tempScope.substring(tempScope.indexOf(':'));
+ lock.scope = tempScope.substring
+ (tempScope.indexOf(':') + 1);
} else {
lock.scope = tempScope;
}
@@ -1732,6 +1732,8 @@
String toAppend = path.substring(relativePath.length());
if ((!toAppend.startsWith("/")) && (!absoluteUri.endsWith("/")))
toAppend = "/" + toAppend;
+ if (toAppend.equals("/"))
+ toAppend = "";
generatedXML.writeText(absoluteUri + toAppend);
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]