fix: Changes the PutBucketTagging action response status code from 200(OK) to 204(No Content)

This commit is contained in:
jonaustin09
2024-10-31 18:30:07 -04:00
parent 7fdfecf7f9
commit 7bd32a2cfa
4 changed files with 43 additions and 1 deletions

View File

@@ -1150,6 +1150,7 @@ func (c S3ApiController) PutBucketActions(ctx *fiber.Ctx) error {
MetricsMng: c.mm,
Action: metrics.ActionPutBucketTagging,
BucketOwner: parsedAcl.Owner,
Status: http.StatusNoContent,
})
}

View File

@@ -750,7 +750,7 @@ func TestS3ApiController_PutBucketActions(t *testing.T) {
req: httptest.NewRequest(http.MethodPut, "/my-bucket?tagging", strings.NewReader(tagBody)),
},
wantErr: false,
statusCode: 200,
statusCode: 204,
},
{
name: "Put-bucket-ownership-controls-invalid-ownership",