This is an automated email from the ASF dual-hosted git repository.
remm pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/9.0.x by this push:
new a8da6d3fca Failed precondition should make WebDAV DELETE fail
a8da6d3fca is described below
commit a8da6d3fcaa62a2f815ad88f9bf4c3e9c1563c3e
Author: remm <[email protected]>
AuthorDate: Tue Apr 7 08:51:45 2026 +0200
Failed precondition should make WebDAV DELETE fail
PR#982 by Mahmoud Alarby.
---
java/org/apache/catalina/servlets/WebdavServlet.java | 1 +
webapps/docs/changelog.xml | 4 ++++
2 files changed, 5 insertions(+)
diff --git a/java/org/apache/catalina/servlets/WebdavServlet.java
b/java/org/apache/catalina/servlets/WebdavServlet.java
index 7c3bebb3a4..939cbe2e73 100644
--- a/java/org/apache/catalina/servlets/WebdavServlet.java
+++ b/java/org/apache/catalina/servlets/WebdavServlet.java
@@ -1240,6 +1240,7 @@ public class WebdavServlet extends DefaultServlet
implements PeriodicEventListen
WebResource resource = resources.getResource(path);
if (!checkIfHeaders(req, resp, resource)) {
resp.setStatus(HttpServletResponse.SC_PRECONDITION_FAILED);
+ return;
}
deleteResource(path, req, resp, true);
}
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 4f7e7c7c63..260f37f8d9 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -116,6 +116,10 @@
could appear in the access log rather than <code>?</code> when the
query
string was present but empty. (markt)
</fix>
+ <fix>
+ Failed precondition should make WebDAV DELETE fail. <pr>982</pr>
+ submitted by Mahmoud Alarby. (remm)
+ </fix>
</changelog>
</subsection>
<subsection name="Coyote">
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]