https://bz.apache.org/bugzilla/show_bug.cgi?id=69360

            Bug ID: 69360
           Summary: Inconsistent DELETE behavior between DefaultServlet
                    and WebdavServlet
           Product: Tomcat 9
           Version: 9.0.95
          Hardware: All
                OS: All
            Status: NEW
          Severity: major
          Priority: P2
         Component: Catalina
          Assignee: dev@tomcat.apache.org
          Reporter: micha...@apache.org
  Target Milestone: -----

If a resource cannot be deleted by the DefaultServlet
https://github.com/apache/tomcat/blob/c50b8aa2588c85df86c0c6e0cd03e79700822360/java/org/apache/catalina/servlets/DefaultServlet.java#L699-L700
METHOD_NOT_ALLOWED is returned. Either the resource is readOnly or
java.io.File#delete() returns false. Reasonable. But the WebdavServlet says
https://github.com/apache/tomcat/blob/c50b8aa2588c85df86c0c6e0cd03e79700822360/java/org/apache/catalina/servlets/WebdavServlet.java#L1703-L1714
INTERNAL_SERVER_ERROR which is inconsistent and not necessarily true. We can
only return this if we use Files#delete(Path).

If no one objects I will return METHOD_NOT_ALLOWED for both servlets. Took me
some time to search for the exception in the catalina.out which I haven't found
until I have found this inconsistency.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to