From 5d7600e3cada81e26b01aa0e2713c3aef517bcdc Mon Sep 17 00:00:00 2001 From: Gleb Schukin Date: Wed, 11 May 2016 15:06:08 +0300 Subject: [PATCH] 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 --- vendor/github.com/ncw/swift/swift.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vendor/github.com/ncw/swift/swift.go b/vendor/github.com/ncw/swift/swift.go index e5be4ebc..1ad8fcc1 100644 --- a/vendor/github.com/ncw/swift/swift.go +++ b/vendor/github.com/ncw/swift/swift.go @@ -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 {