mirror of
https://github.com/minio/minio.git
synced 2025-03-12 20:50:11 -04:00
Merge pull request #1238 from hackintoshrao/maxkeys-zero-fix
[GH-1237] api: Handling maxKeys=0 case with a empty response
This commit is contained in:
commit
e7e2fae156
@ -64,7 +64,12 @@ func (fs Filesystem) ListObjects(bucket, prefix, marker, delimiter string, maxKe
|
||||
}
|
||||
}
|
||||
|
||||
if maxKeys <= 0 || maxKeys > listObjectsLimit {
|
||||
// Return empty response for a valid request when maxKeys is 0.
|
||||
if maxKeys == 0 {
|
||||
return result, nil
|
||||
}
|
||||
|
||||
if maxKeys < 0 || maxKeys > listObjectsLimit {
|
||||
maxKeys = listObjectsLimit
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user