This is an automated email from the ASF dual-hosted git repository.

remm pushed a commit to branch 10.1.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/10.1.x by this push:
     new e0ce7bc128 Failed precondition should make WebDAV DELETE fail
e0ce7bc128 is described below

commit e0ce7bc128f18a207452fb717bf7c7a1218f4264
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 3e8fd43e18..d0db5f9824 100644
--- a/java/org/apache/catalina/servlets/WebdavServlet.java
+++ b/java/org/apache/catalina/servlets/WebdavServlet.java
@@ -1241,6 +1241,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 2ae09945f1..bc16fe452d 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]

Reply via email to