mirror of
https://github.com/pgsty/minio.git
synced 2026-08-11 08:43:28 +03:00
@@ -132,9 +132,13 @@ func (fi FileInfo) ToObjectInfo(bucket, object string, versioned bool) ObjectInf
|
|||||||
t time.Time
|
t time.Time
|
||||||
e error
|
e error
|
||||||
)
|
)
|
||||||
|
|
||||||
|
const nonStandardHTTPTimeFormat = "Mon, 2 Jan 2006 15:04:05 GMT"
|
||||||
if exp, ok := fi.Metadata["expires"]; ok {
|
if exp, ok := fi.Metadata["expires"]; ok {
|
||||||
if t, e = time.Parse(http.TimeFormat, exp); e == nil {
|
if t, e = time.Parse(http.TimeFormat, exp); e == nil {
|
||||||
objInfo.Expires = t.UTC()
|
objInfo.Expires = t.UTC()
|
||||||
|
} else if t, e = time.Parse(nonStandardHTTPTimeFormat, exp); e == nil {
|
||||||
|
objInfo.Expires = t.UTC()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
objInfo.backendType = BackendErasure
|
objInfo.backendType = BackendErasure
|
||||||
|
|||||||
Reference in New Issue
Block a user