forked from TrueCloudLab/frostfs-s3-gw
[#216] Add check tag key uniqueness
Signed-off-by: Roman Loginov <r.loginov@yadro.com>
This commit is contained in:
parent
298662df9d
commit
01323ca8e0
3 changed files with 77 additions and 2 deletions
|
@ -219,6 +219,9 @@ func (h *handler) readTagSet(reader io.Reader) (map[string]string, error) {
|
|||
|
||||
tagSet := make(map[string]string, len(tagging.TagSet))
|
||||
for _, tag := range tagging.TagSet {
|
||||
if _, ok := tagSet[tag.Key]; ok {
|
||||
return nil, errors.GetAPIError(errors.ErrInvalidTagKeyUniqueness)
|
||||
}
|
||||
tagSet[tag.Key] = tag.Value
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue