This is an automated email from the ASF dual-hosted git repository. michaelo 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 33d26b4036 Make WebdavServlet properly return the Allow header on NOT_ALLOWED status 33d26b4036 is described below commit 33d26b403669541c9ef4ca3e568387f33412bae4 Author: Michael Osipov <micha...@apache.org> AuthorDate: Wed Oct 2 13:48:45 2024 +0200 Make WebdavServlet properly return the Allow header on NOT_ALLOWED status --- java/org/apache/catalina/servlets/WebdavServlet.java | 2 +- webapps/docs/changelog.xml | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/java/org/apache/catalina/servlets/WebdavServlet.java b/java/org/apache/catalina/servlets/WebdavServlet.java index 0ea34b4f34..2858219324 100644 --- a/java/org/apache/catalina/servlets/WebdavServlet.java +++ b/java/org/apache/catalina/servlets/WebdavServlet.java @@ -1693,7 +1693,7 @@ public class WebdavServlet extends DefaultServlet implements PeriodicEventListen if (!resource.isDirectory()) { if (!resource.delete()) { - resp.sendError(WebdavStatus.SC_METHOD_NOT_ALLOWED); + sendNotAllowed(req, resp); return false; } } else { diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index 51d0bf6233..7b00539192 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -152,6 +152,10 @@ <code>WebdavServlet</code> and <code>DefaultServlet</code>. (michaelo) </fix> + <fix> + Make <code>WebdavServlet</code> properly return the <code>Allow</code> + header when deletion of a resource is not allowed. (michaelo) + </fix> </changelog> </subsection> <subsection name="Coyote"> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org