- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for SetPredictionHeaders (0.45 sec)
-
internal/bucket/lifecycle/lifecycle.go
if days == 0 { return modTime } t := modTime.UTC().Add(time.Duration(days+1) * 24 * time.Hour) return t.Truncate(24 * time.Hour) } // SetPredictionHeaders sets time to expiry and transition headers on w for a // given obj. func (lc Lifecycle) SetPredictionHeaders(w http.ResponseWriter, obj ObjectOpts) { event := lc.eval(obj, time.Time{}) switch event.Action {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu May 23 01:12:48 UTC 2024 - 17.9K bytes - Viewed (0) -
cmd/api-headers.go
w.Header()[xhttp.AmzStorageClass] = []string{filterStorageClass(ctx, objInfo.TransitionedObject.Tier)} } if lc, err := globalLifecycleSys.Get(objInfo.Bucket); err == nil { lc.SetPredictionHeaders(w, objInfo.ToLifecycleOpts()) } if v, ok := objInfo.UserDefined[ReservedMetadataPrefix+"compression"]; ok { if i := strings.LastIndexByte(v, '/'); i >= 0 { v = v[i+1:] }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue May 28 04:44:00 UTC 2024 - 7K bytes - Viewed (0) -
cmd/object-handlers-common.go
} } if objInfo.Bucket != "" && objInfo.Name != "" { if lc, err := globalLifecycleSys.Get(objInfo.Bucket); err == nil && !delete { lc.SetPredictionHeaders(w, objInfo.ToLifecycleOpts()) } } hash.AddChecksumHeader(w, objInfo.decryptChecksums(0, h)) }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Sep 03 06:33:53 UTC 2024 - 15.3K bytes - Viewed (0) -
internal/bucket/lifecycle/lifecycle_test.go
expRuleID: 0, transRuleID: 1, }, { obj: obj2, expRuleID: 0, transRuleID: 2, }, } for i, tc := range tests { w := httptest.NewRecorder() lc.SetPredictionHeaders(w, tc.obj) if expHdrs, ok := w.Header()[xhttp.AmzExpiration]; ok && !strings.Contains(expHdrs[0], lc.Rules[tc.expRuleID].ID) { t.Fatalf("Test %d: Expected %s header", i+1, xhttp.AmzExpiration) }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu May 23 01:12:48 UTC 2024 - 55.1K bytes - Viewed (0)