fix: correct max_keys field in list_object_versions response (#1576)

Signed-off-by: 安正超 <anzhengchao@gmail.com>
Co-authored-by: loverustfs <hello@rustfs.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
安正超
2026-01-22 20:58:03 +08:00
committed by GitHub
parent db253c01a9
commit 43bf846633
5 changed files with 19 additions and 5 deletions
+3 -3
View File
@@ -3725,8 +3725,6 @@ impl S3 for FS {
})
.collect();
let key_count = objects.len() as i32;
let common_prefixes = object_infos
.prefixes
.into_iter()
@@ -3753,7 +3751,9 @@ impl S3 for FS {
let output = ListObjectVersionsOutput {
is_truncated: Some(object_infos.is_truncated),
max_keys: Some(key_count),
// max_keys should be the requested maximum number of keys, not the actual count returned
// Per AWS S3 API spec, this field represents the maximum number of keys that can be returned in the response
max_keys: Some(max_keys),
delimiter,
name: Some(bucket),
prefix: Some(prefix),