juergen 02/05/29 01:19:44
Modified: src/webdav/server/org/apache/slide/webdav/method
LockMethod.java
Log:
The owner element may be ommitted in the lock method. Use a default instead of
creating an exception. BUT ... the owner element is not stored in the slide store
level, but the principal URI instead. This seems like an additional bug.
Revision Changes Path
1.37 +11 -5
jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/LockMethod.java
Index: LockMethod.java
===================================================================
RCS file:
/home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/LockMethod.java,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -r1.36 -r1.37
--- LockMethod.java 28 May 2002 12:39:40 -0000 1.36
+++ LockMethod.java 29 May 2002 08:19:44 -0000 1.37
@@ -1,7 +1,7 @@
/*
- * $Header:
/home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/LockMethod.java,v
1.36 2002/05/28 12:39:40 juergen Exp $
- * $Revision: 1.36 $
- * $Date: 2002/05/28 12:39:40 $
+ * $Header:
/home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/LockMethod.java,v
1.37 2002/05/29 08:19:44 juergen Exp $
+ * $Revision: 1.37 $
+ * $Date: 2002/05/29 08:19:44 $
*
* ====================================================================
*
@@ -129,6 +129,10 @@
*/
private static final int MAX_TIMEOUT = 604800;
+ /**
+ * The default owner if not explicitely specified by the request.
+ */
+ private static final String DEFAULT_LOCK_OWNER = "SlideDefaultLockOwner";
// ----------------------------------------------------- Instance Variables
@@ -400,7 +404,8 @@
private void parseOwner(Element ownerElement) throws JDOMException {
if (ownerElement == null) {
- throw new JDOMException("Expected <"+E_OWNER+"> element");
+ lockInfo_lockOwner = DEFAULT_LOCK_OWNER;
+// throw new JDOMException("Expected <"+E_OWNER+"> element");
}
StringWriter stringWriter = new StringWriter();
@@ -416,7 +421,8 @@
lockInfo_lockOwner = stringWriter.toString();
if (lockInfo_lockOwner.length() == 0) {
- throw new JDOMException("<"+E_OWNER+"> element must not be
empty");
+ lockInfo_lockOwner = DEFAULT_LOCK_OWNER;
+// throw new JDOMException("<"+E_OWNER+"> element must not be
empty");
}
}
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>