fix: return MalformedXML for a DeleteObjects request without objects

A DeleteObjects request whose Delete element names no objects was
answered with 200 and an empty DeleteResult. S3 rejects it with
MalformedXML, as the schema requires at least one Object.

Reject the empty list right after the body is parsed, next to the
1000 key limit check. Update the unit and integration tests that
expected the empty result and enable the REST test that covers it.

Fixes #2109
This commit is contained in:
dualfroz committed 2026-10-03 16:01:57 +02:00
1 parent edbb6c2d74
commit 62d77006d2
4 files changed
+20 -16

No files matched your search

-3
View File
@@ -36,9 +36,6 @@ source ./tests/setup.sh
# tags: curl, DeleteObjects, malformed-message
@test "REST - DeleteObjects - no objects added to payload" {
if [ "$DIRECT" != "true" ]; then
skip "https://github.com/versity/versitygw/issues/2109"
fi
run setup_bucket_and_file_v3 "$BUCKET_ONE_NAME"
assert_success
read -r bucket_name file_name <<< "$output"