This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 7.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git
commit 0c1db4105cc577fca61d2e6f39e4d634bcaab57f Author: Mark Thomas <ma...@apache.org> AuthorDate: Tue Jul 2 14:12:55 2019 +0100 Fix a couple of Litmus test suite failures --- java/org/apache/catalina/servlets/WebdavServlet.java | 5 +++++ webapps/docs/changelog.xml | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/java/org/apache/catalina/servlets/WebdavServlet.java b/java/org/apache/catalina/servlets/WebdavServlet.java index bcc795d..1f477cb 100644 --- a/java/org/apache/catalina/servlets/WebdavServlet.java +++ b/java/org/apache/catalina/servlets/WebdavServlet.java @@ -1825,6 +1825,11 @@ public class WebdavServlet extends DefaultServlet { } else { if (object instanceof Resource) { + // WebDAV Litmus test attempts to copy/move a file over a collection + // Need to remove trailing / from destination to enable test to pass + if (dest.endsWith("/") && dest.length() > 1) { + dest = dest.substring(0, dest.length() - 1); + } try { dirContext.bind(dest, object); } catch (NamingException e) { diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index 0284199..46d3c79 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -135,6 +135,10 @@ <code>Allow</code> header and a method listed in the <code>Allow</code> header will not return a 405 status code. (markt) </fix> + <fix> + Correct two failing tests from the Litmus test suite for WebDAV when + copying/moving a file over a collection. (markt) + </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