Set expected expiry date for ExpiredObjectAllVersions (#19210)

This commit is contained in:
Krishnan Parthasarathi 2024-03-05 22:28:57 -08:00 committed by GitHub
parent dae9dc4847
commit c26b8d4eb8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -515,7 +515,7 @@ func ExpectedExpiryTime(modTime time.Time, days int) time.Time {
func (lc Lifecycle) SetPredictionHeaders(w http.ResponseWriter, obj ObjectOpts) {
event := lc.eval(obj, time.Time{})
switch event.Action {
case DeleteAction, DeleteVersionAction:
case DeleteAction, DeleteVersionAction, DeleteAllVersionsAction:
w.Header()[xhttp.AmzExpiration] = []string{
fmt.Sprintf(`expiry-date="%s", rule-id="%s"`, event.Due.Format(http.TimeFormat), event.RuleID),
}