mirror of
https://github.com/minio/minio.git
synced 2025-01-23 12:43:16 -05:00
Don't set empty ETag values
Currently, metadata.Md5 value isn't populated, yet the ETag is set to `""`, causing AWS Java SDK to fail integrity checks with GetObject api calls.
This commit is contained in:
parent
52f00042b4
commit
43685788ab
@ -79,7 +79,9 @@ func setObjectHeaders(w http.ResponseWriter, metadata fs.ObjectMetadata, content
|
|||||||
lastModified := metadata.Created.Format(http.TimeFormat)
|
lastModified := metadata.Created.Format(http.TimeFormat)
|
||||||
// object related headers
|
// object related headers
|
||||||
w.Header().Set("Content-Type", "application/octet-stream")
|
w.Header().Set("Content-Type", "application/octet-stream")
|
||||||
w.Header().Set("ETag", "\""+metadata.Md5+"\"")
|
if metadata.Md5 != "" {
|
||||||
|
w.Header().Set("ETag", "\""+metadata.Md5+"\"")
|
||||||
|
}
|
||||||
w.Header().Set("Last-Modified", lastModified)
|
w.Header().Set("Last-Modified", lastModified)
|
||||||
|
|
||||||
// set content range
|
// set content range
|
||||||
|
Loading…
x
Reference in New Issue
Block a user