Merge pull request #136 from masterSplinter01/bugfix/135-max-keys-check
[#135] Add max-keys check to ListObjects
This commit is contained in:
commit
f873be8019
1 changed files with 1 additions and 1 deletions
|
@ -289,7 +289,7 @@ func parseListObjectArgs(r *http.Request) (*listObjectsArgs, error) {
|
||||||
|
|
||||||
if r.URL.Query().Get("max-keys") == "" {
|
if r.URL.Query().Get("max-keys") == "" {
|
||||||
res.MaxKeys = maxObjectList
|
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)
|
return nil, api.GetAPIError(api.ErrInvalidMaxKeys)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue