juergen 01/07/18 07:37:34
Modified: src/webdav/server/org/apache/slide/webdav/method
WebdavMethod.java
Log:
if an e.g.delete operation on a non existing resource is tried the response code is
now not packed in a 207 any more.
Revision Changes Path
1.26 +10 -8
jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/WebdavMethod.java
Index: WebdavMethod.java
===================================================================
RCS file:
/home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/WebdavMethod.java,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- WebdavMethod.java 2001/07/13 10:36:11 1.25
+++ WebdavMethod.java 2001/07/18 14:37:34 1.26
@@ -1,7 +1,7 @@
/*
- * $Header:
/home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/WebdavMethod.java,v
1.25 2001/07/13 10:36:11 dirkv Exp $
- * $Revision: 1.25 $
- * $Date: 2001/07/13 10:36:11 $
+ * $Header:
/home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/WebdavMethod.java,v
1.26 2001/07/18 14:37:34 juergen Exp $
+ * $Revision: 1.26 $
+ * $Date: 2001/07/18 14:37:34 $
*
* ====================================================================
*
@@ -102,7 +102,7 @@
"http://jakarta.apache.org/slide/";
public static final String SLIDE_NAMESPACE_ABBREV = "S";
- public static final String PRINCIPAL =
+ public static final String PRINCIPAL =
"org.apache.slide.webdav.method.principal";
@@ -281,7 +281,7 @@
this.macro = token.getMacroHelper();
if (principal == null) {
- this.principal =
+ this.principal =
(Principal) req.getSession(true).getAttribute(PRINCIPAL);
} else {
req.getSession(true).setAttribute(PRINCIPAL, principal);
@@ -328,7 +328,7 @@
transactionIsStarted = false;
}
} catch (WebdavException ex) {
- // Ignore the WebDav Exception and assume that the response code
+ // Ignore the WebDav Exception and assume that the response code
// is already set.
} catch (Exception ex) {
ex.printStackTrace();
@@ -559,8 +559,9 @@
}
else
return true;
- } catch(SlideException e) { // Probably means the revision didn't
- // exist, so return true.
+ } catch(ObjectNotFoundException e) {
+ return false; // if the Object is not found return false for no 207 is
generated
+ } catch(SlideException e) { // this is the default
return true;
}
}
@@ -694,4 +695,5 @@
}
+