fix(s3): DeleteObjects honours empty key list (#2201)

Fixes : #2198

Co-authored-by: Krishnan Mahadevan <kmahadevan-bidgely@users.noreply.github.com>
This commit is contained in:
Krishnan MahadevanandKrishnan Mahadevan authored and GitHub committed 2026-08-10 23:11:59 -04:00
1 parent f417164d42
commit 15d6ce8429
2 files changed
+78

No files matched your search

@@ -1237,6 +1237,10 @@ public class S3Controller {
private Response handleDeleteObjects(String bucket, byte[] body) {
String xml = new String(body, StandardCharsets.UTF_8);
List<String> keys = XmlParser.extractAll(xml, "Key");
if (keys.isEmpty()) {
throw new AwsException("MalformedXML",
"The XML you provided was not well-formed.", 400);
}
boolean quiet = XmlParser.containsValue(xml, "Quiet", "true");
S3Service.DeleteObjectsResult result = s3Service.deleteObjects(bucket, keys);