Merge pull request #1062 from notnoopci/no-empty-md5-header

Don't set empty ETag values
master
Harshavardhana 9 years ago
commit 716fde3b93
  1. 2
      api-headers.go

@ -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")
if metadata.Md5 != "" {
w.Header().Set("ETag", "\""+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…
Cancel
Save