[#131] Remove metadata from Object in ListObjects

Because ListObjects v1 and v2 shouldn't show metadata. Also aws cli
doesn't show metadata even we return it.

Signed-off-by: Angira Kekteeva <kira@nspcc.ru>
This commit is contained in:
Angira Kekteeva 2021-07-09 00:01:33 +03:00
parent da9a6e4b33
commit d5dfc0006a
2 changed files with 0 additions and 5 deletions

View file

@ -202,7 +202,6 @@ func encodeV1(arg *listObjectsArgs, list *layer.ListObjectsInfo) *ListObjectsRes
res.Contents = append(res.Contents, Object{
Key: obj.Name,
Size: obj.Size,
UserMetadata: obj.Headers,
LastModified: obj.Created.Format(time.RFC3339),
Owner: Owner{
@ -265,7 +264,6 @@ func encodeV2(arg *listObjectsArgs, list *layer.ListObjectsInfo) *ListObjectsV2R
res.Contents = append(res.Contents, Object{
Key: obj.Name,
Size: obj.Size,
UserMetadata: obj.Headers,
LastModified: obj.Created.Format(time.RFC3339),
Owner: Owner{

View file

@ -104,9 +104,6 @@ type Object struct {
// The class of storage used to store the object.
StorageClass string `xml:"StorageClass,omitempty"`
// UserMetadata user-defined metadata
UserMetadata StringMap `xml:"UserMetadata,omitempty"`
}
// ObjectVersionResponse container for object version in the response of ListBucketObjectVersionsHandler.