This is an automated email from the ASF dual-hosted git repository.
remm pushed a commit to branch 11.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/11.0.x by this push:
new 8bd4a655d6 Remove useless method
8bd4a655d6 is described below
commit 8bd4a655d6652ac0df68ec3ee9e218e5d031d62d
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 4d619d8b65..17973253f4 100644
--- a/java/org/apache/catalina/servlets/WebdavServlet.java
+++ b/java/org/apache/catalina/servlets/WebdavServlet.java
@@ -1232,7 +1232,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);
}
@@ -2262,27 +2266,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]