mirror of https://github.com/minio/minio.git
parent
2d9b5a65f1
commit
7776d064cf
|
@ -132,9 +132,13 @@ func (fi FileInfo) ToObjectInfo(bucket, object string, versioned bool) ObjectInf
|
|||
t time.Time
|
||||
e error
|
||||
)
|
||||
|
||||
const nonStandardHTTPTimeFormat = "Mon, 2 Jan 2006 15:04:05 GMT"
|
||||
if exp, ok := fi.Metadata["expires"]; ok {
|
||||
if t, e = time.Parse(http.TimeFormat, exp); e == nil {
|
||||
objInfo.Expires = t.UTC()
|
||||
} else if t, e = time.Parse(nonStandardHTTPTimeFormat, exp); e == nil {
|
||||
objInfo.Expires = t.UTC()
|
||||
}
|
||||
}
|
||||
objInfo.backendType = BackendErasure
|
||||
|
|
Loading…
Reference in New Issue