mirror of
https://github.com/floci-io/floci.git
synced 2026-11-27 07:39:24 -05:00
fix(s3): return NoSuchTagSet from GetBucketTagging on untagged buckets (#4585)
GetBucketTagging returned 200 with an empty TagSet when a bucket had no tags, including after DeleteBucketTagging. AWS returns the NoSuchTagSet error instead. S3 Control ListTagsForResource still reports an empty list.
This commit is contained in:
1 parent
fbbbf244af
commit
93ec5967fe
4 files changed
+54
-6
No files matched your search
@@ -2119,6 +2119,9 @@ public class S3Controller {
|
||||
|
||||
private Response handleGetBucketTagging(String bucket) {
|
||||
Map<String, String> tags = s3Service.getBucketTagging(bucket);
|
||||
if (tags.isEmpty()) {
|
||||
throw new AwsException("NoSuchTagSet", "The TagSet does not exist", 404);
|
||||
}
|
||||
return Response.ok(buildTaggingXml(tags)).type(MediaType.APPLICATION_XML).build();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user