|
|
@ -184,12 +184,13 @@ func setObjectHeaders(w http.ResponseWriter, objInfo ObjectInfo, rs *HTTPRangeSp |
|
|
|
} |
|
|
|
} |
|
|
|
if lc, err := globalLifecycleSys.Get(objInfo.Bucket); err == nil { |
|
|
|
if lc, err := globalLifecycleSys.Get(objInfo.Bucket); err == nil { |
|
|
|
ruleID, expiryTime := lc.PredictExpiryTime(lifecycle.ObjectOpts{ |
|
|
|
ruleID, expiryTime := lc.PredictExpiryTime(lifecycle.ObjectOpts{ |
|
|
|
Name: objInfo.Name, |
|
|
|
Name: objInfo.Name, |
|
|
|
UserTags: objInfo.UserTags, |
|
|
|
UserTags: objInfo.UserTags, |
|
|
|
VersionID: objInfo.VersionID, |
|
|
|
VersionID: objInfo.VersionID, |
|
|
|
ModTime: objInfo.ModTime, |
|
|
|
ModTime: objInfo.ModTime, |
|
|
|
IsLatest: objInfo.IsLatest, |
|
|
|
IsLatest: objInfo.IsLatest, |
|
|
|
DeleteMarker: objInfo.DeleteMarker, |
|
|
|
DeleteMarker: objInfo.DeleteMarker, |
|
|
|
|
|
|
|
SuccessorModTime: objInfo.SuccessorModTime, |
|
|
|
}) |
|
|
|
}) |
|
|
|
if !expiryTime.IsZero() { |
|
|
|
if !expiryTime.IsZero() { |
|
|
|
w.Header()[xhttp.AmzExpiration] = []string{ |
|
|
|
w.Header()[xhttp.AmzExpiration] = []string{ |
|
|
|