mirror of
https://github.com/distribution/distribution.git
synced 2025-09-04 00:16:10 +00: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:
8
vendor/github.com/ncw/swift/swift.go
generated
vendored
8
vendor/github.com/ncw/swift/swift.go
generated
vendored
@@ -1737,9 +1737,11 @@ func (c *Connection) Object(container string, objectName string) (info Object, h
|
||||
return
|
||||
}
|
||||
}
|
||||
info.ServerLastModified = resp.Header.Get("Last-Modified")
|
||||
if info.LastModified, err = time.Parse(http.TimeFormat, info.ServerLastModified); err != nil {
|
||||
return
|
||||
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 {
|
||||
return
|
||||
}
|
||||
}
|
||||
info.Hash = resp.Header.Get("Etag")
|
||||
return
|
||||
|
Reference in New Issue
Block a user