From c1fc7779ca115655310f801d142a139611c331eb Mon Sep 17 00:00:00 2001 From: Aditya Manthramurthy Date: Thu, 31 Oct 2024 12:27:06 -0700 Subject: [PATCH] Remove `expires` field from list objects metadata (#20600) This field was always 0 regardless of whether the object had an expiry so we are basically removing dead code. --- cmd/api-response.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/cmd/api-response.go b/cmd/api-response.go index 81c04e128..391b6d7cc 100644 --- a/cmd/api-response.go +++ b/cmd/api-response.go @@ -593,9 +593,6 @@ func generateListVersionsResponse(ctx context.Context, bucket, prefix, marker, v for k, v := range cleanReservedKeys(object.UserDefined) { content.UserMetadata.Set(k, v) } - if !object.Expires.IsZero() { - content.UserMetadata.Set("expires", object.Expires.Format(http.TimeFormat)) - } content.Internal = &ObjectInternalInfo{ K: object.DataBlocks, M: object.ParityBlocks, @@ -730,9 +727,6 @@ func generateListObjectsV2Response(ctx context.Context, bucket, prefix, token, n for k, v := range cleanReservedKeys(object.UserDefined) { content.UserMetadata.Set(k, v) } - if !object.Expires.IsZero() { - content.UserMetadata.Set("expires", object.Expires.Format(http.TimeFormat)) - } content.Internal = &ObjectInternalInfo{ K: object.DataBlocks, M: object.ParityBlocks,