forked from TrueCloudLab/frostfs-s3-gw
[#135] Add max-keys check to ListObjects
Signed-off-by: Angira Kekteeva <kira@nspcc.ru>
This commit is contained in:
parent
cc0e2e7636
commit
fd41c325f7
1 changed files with 1 additions and 1 deletions
|
@ -276,7 +276,7 @@ func parseListObjectArgs(r *http.Request) (*listObjectsArgs, error) {
|
|||
|
||||
if r.URL.Query().Get("max-keys") == "" {
|
||||
res.MaxKeys = maxObjectList
|
||||
} else if res.MaxKeys, err = strconv.Atoi(r.URL.Query().Get("max-keys")); err != nil {
|
||||
} else if res.MaxKeys, err = strconv.Atoi(r.URL.Query().Get("max-keys")); err != nil || res.MaxKeys <= 0 {
|
||||
return nil, api.GetAPIError(api.ErrInvalidMaxKeys)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue