juergen 01/09/06 01:15:56
Modified: src/webdav/server/org/apache/slide/webdav/method
CopyMethod.java
Log:
if the revision (content) is not found (e.g. in a multi user environment) return a
404 instead of a 500.
Revision Changes Path
1.21 +17 -3
jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/CopyMethod.java
Index: CopyMethod.java
===================================================================
RCS file:
/home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/CopyMethod.java,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- CopyMethod.java 2001/09/01 15:07:06 1.20
+++ CopyMethod.java 2001/09/06 08:15:56 1.21
@@ -1,7 +1,7 @@
/*
- * $Header:
/home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/CopyMethod.java,v
1.20 2001/09/01 15:07:06 juergen Exp $
- * $Revision: 1.20 $
- * $Date: 2001/09/01 15:07:06 $
+ * $Header:
/home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/CopyMethod.java,v
1.21 2001/09/06 08:15:56 juergen Exp $
+ * $Revision: 1.21 $
+ * $Date: 2001/09/06 08:15:56 $
*
* ====================================================================
*
@@ -167,6 +167,20 @@
}
+
+
+ /**
+ * Get return status based on exception type.
+ */
+ protected int getErrorCode(SlideException ex) {
+ try {
+ throw ex;
+ } catch(RevisionNotFoundException e) {
+ return WebdavStatus.SC_NOT_FOUND;
+ } catch (SlideException e) {
+ return super.getErrorCode(e);
+ }
+ }
}