This is an automated email from the ASF dual-hosted git repository.
markt 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 69a4bbffde Fix BZ 69361 Make multi-status and processing order
consistent
69a4bbffde is described below
commit 69a4bbffdeeb827fc4dcf90ab7c2dcfa2940cf0f
Author: Mark Thomas <[email protected]>
AuthorDate: Thu Oct 3 16:42:41 2024 +0100
Fix BZ 69361 Make multi-status and processing order consistent
https://bz.apache.org/bugzilla/show_bug.cgi?id=69361
---
java/org/apache/catalina/servlets/WebdavServlet.java | 6 +++---
webapps/docs/changelog.xml | 5 +++++
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/java/org/apache/catalina/servlets/WebdavServlet.java
b/java/org/apache/catalina/servlets/WebdavServlet.java
index b18953ba2a..9de0144ef6 100644
--- a/java/org/apache/catalina/servlets/WebdavServlet.java
+++ b/java/org/apache/catalina/servlets/WebdavServlet.java
@@ -31,8 +31,8 @@ import java.util.Collection;
import java.util.Collections;
import java.util.Date;
import java.util.Deque;
-import java.util.HashMap;
import java.util.Iterator;
+import java.util.LinkedHashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
@@ -1529,7 +1529,7 @@ public class WebdavServlet extends DefaultServlet
implements PeriodicEventListen
// Copying source to destination
- Map<String,Integer> errorList = new HashMap<>();
+ Map<String,Integer> errorList = new LinkedHashMap<>();
boolean infiniteCopy = true;
String depthHeader = req.getHeader("Depth");
@@ -1710,7 +1710,7 @@ public class WebdavServlet extends DefaultServlet
implements PeriodicEventListen
}
} else {
- Map<String,Integer> errorList = new HashMap<>();
+ Map<String,Integer> errorList = new LinkedHashMap<>();
deleteCollection(req, path, errorList);
if (!resource.delete()) {
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index cbd6567244..a27201539d 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -160,6 +160,11 @@
Add log warning if non wildcard mappings are used with the
<code>WebdavServlet</code>. (remm)
</fix>
+ <fix>
+ <bug>69361</bug>: Ensure that the order of entires in a multi-status
+ response to a WebDAV is consistent with the order in which resources
+ were processed. (markt)
+ </fix>
<fix>
<bug>69362</bug>: Provide a better multi-status response when deleting
a
collection via WebDAV fails. Empty directories that cannot be deleted
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]