mirror of
https://github.com/floci-io/floci.git
synced 2026-11-24 06:20:24 -05:00
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:
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);
|
||||
|
||||
|
||||
Reference in new issue
Block a user