fix: correct max_keys field in list_object_versions response (#1576)
Signed-off-by: 安正超 <[email protected]> Co-authored-by: loverustfs <[email protected]> Co-authored-by: Copilot <[email protected]>
This commit is contained in:
co-authored by
loverustfs
Copilot
parent
db253c01a9
commit
43bf846633
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user