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:
parent
52eecb556c
commit
5d7600e3ca
1 changed files with 3 additions and 0 deletions
3
vendor/github.com/ncw/swift/swift.go
generated
vendored
3
vendor/github.com/ncw/swift/swift.go
generated
vendored
|
@ -1737,6 +1737,9 @@ func (c *Connection) Object(container string, objectName string) (info Object, h
|
||||||
return
|
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") != "" {
|
if resp.Header.Get("Last-Modified") != "" {
|
||||||
info.ServerLastModified = resp.Header.Get("Last-Modified")
|
info.ServerLastModified = resp.Header.Get("Last-Modified")
|
||||||
if info.LastModified, err = time.Parse(http.TimeFormat, info.ServerLastModified); err != nil {
|
if info.LastModified, err = time.Parse(http.TimeFormat, info.ServerLastModified); err != nil {
|
||||||
|
|
Loading…
Reference in a new issue