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>master
							parent
							
								
									e69f108924
								
							
						
					
					
						commit
						52eecb556c
					
				|  | @ -1737,9 +1737,11 @@ func (c *Connection) Object(container string, objectName string) (info Object, h | ||||||
| 			return | 			return | ||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
| 	info.ServerLastModified = resp.Header.Get("Last-Modified") | 	if resp.Header.Get("Last-Modified") != "" { | ||||||
| 	if info.LastModified, err = time.Parse(http.TimeFormat, info.ServerLastModified); err != nil { | 		info.ServerLastModified = resp.Header.Get("Last-Modified") | ||||||
| 		return | 		if info.LastModified, err = time.Parse(http.TimeFormat, info.ServerLastModified); err != nil { | ||||||
|  | 			return | ||||||
|  | 		} | ||||||
| 	} | 	} | ||||||
| 	info.Hash = resp.Header.Get("Etag") | 	info.Hash = resp.Header.Get("Etag") | ||||||
| 	return | 	return | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue