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 428d8c92ac Remove useless method
428d8c92ac is described below
commit 428d8c92ac2ca3bfa0f121f6bfd71ad30b728ce5
Author: remm <[email protected]>
AuthorDate: Mon Nov 3 21:30:16 2025 +0100
Remove useless method
---
.../apache/catalina/servlets/WebdavServlet.java | 27 ++++------------------
1 file changed, 5 insertions(+), 22 deletions(-)
diff --git a/java/org/apache/catalina/servlets/WebdavServlet.java
b/java/org/apache/catalina/servlets/WebdavServlet.java
index 7f5c595c1a..3fb360f30f 100644
--- a/java/org/apache/catalina/servlets/WebdavServlet.java
+++ b/java/org/apache/catalina/servlets/WebdavServlet.java
@@ -1238,7 +1238,11 @@ public class WebdavServlet extends DefaultServlet
implements PeriodicEventListen
String path = getRelativePath(req);
- deleteResource(path, req, resp);
+ WebResource resource = resources.getResource(path);
+ if (!checkIfHeaders(req, resp, resource)) {
+ resp.setStatus(HttpServletResponse.SC_PRECONDITION_FAILED);
+ }
+ deleteResource(path, req, resp, true);
}
@@ -2268,27 +2272,6 @@ public class WebdavServlet extends DefaultServlet
implements PeriodicEventListen
}
- /**
- * Delete a resource.
- *
- * @param path Path of the resource which is to be deleted
- * @param req Servlet request
- * @param resp Servlet response
- *
- * @return <code>true</code> if the delete is successful
- *
- * @throws IOException If an IO error occurs
- */
- private boolean deleteResource(String path, HttpServletRequest req,
HttpServletResponse resp) throws IOException {
- WebResource resource = resources.getResource(path);
- if (!checkIfHeaders(req, resp, resource)) {
- resp.setStatus(HttpServletResponse.SC_PRECONDITION_FAILED);
- return false;
- }
- return deleteResource(path, req, resp, true);
- }
-
-
/**
* Delete a resource.
*
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]