1
0
mirror of https://github.com/distribution/distribution synced 2024-11-06 19:35:52 +01:00

Handle rare case when ceph doesn't return Last-Modified for HEAD requests in case DLO manifest doesn't have any segments

Signed-off-by: Gleb Schukin <gs1983@gmail.com>
This commit is contained in:
Gleb Schukin 2016-05-11 15:06:08 +03:00
parent 52eecb556c
commit 5d7600e3ca

@ -1737,6 +1737,9 @@ func (c *Connection) Object(container string, objectName string) (info Object, h
return
}
}
//HACK
//Currently ceph doestn't return Last-Modified header for DLO manifest without any segments
//Currently it affects all versions of ceph http://tracker.ceph.com/issues/15812
if resp.Header.Get("Last-Modified") != "" {
info.ServerLastModified = resp.Header.Get("Last-Modified")
if info.LastModified, err = time.Parse(http.TimeFormat, info.ServerLastModified); err != nil {