mirror of
https://github.com/versity/versitygw.git
synced 2026-01-03 10:35:15 +00:00
fix: Sets limit to tag set count to 10 for PutObjectTagging and 50 for PutBucketTagging
Fixes #1204 Fixes #1205 Tag count in `PutBucketTagging` and `PutObjectTagging` is limited. `PutBucketTagging`: 50 `PutObjectTagging`: 10 Adds the changes to return errors respectively
This commit is contained in:
@@ -85,6 +85,8 @@ const (
|
||||
ErrInvalidCopySource
|
||||
ErrInvalidCopySourceRange
|
||||
ErrInvalidTag
|
||||
ErrBucketTaggingLimited
|
||||
ErrObjectTaggingLimited
|
||||
ErrAuthHeaderEmpty
|
||||
ErrSignatureVersionNotSupported
|
||||
ErrMalformedPOSTRequest
|
||||
@@ -311,6 +313,16 @@ var errorCodeResponse = map[ErrorCode]APIError{
|
||||
Description: "The Tag value you have provided is invalid",
|
||||
HTTPStatusCode: http.StatusBadRequest,
|
||||
},
|
||||
ErrBucketTaggingLimited: {
|
||||
Code: "BadRequest",
|
||||
Description: "Bucket tag count cannot be greater than 50",
|
||||
HTTPStatusCode: http.StatusBadRequest,
|
||||
},
|
||||
ErrObjectTaggingLimited: {
|
||||
Code: "BadRequest",
|
||||
Description: "Object tags cannot be greater than 10",
|
||||
HTTPStatusCode: http.StatusBadRequest,
|
||||
},
|
||||
ErrMalformedXML: {
|
||||
Code: "MalformedXML",
|
||||
Description: "The XML you provided was not well-formed or did not validate against our published schema.",
|
||||
|
||||
Reference in New Issue
Block a user