fs: Do not print redundant md5Sum response header. (#3369)

For both GET and HEAD requests.
master
Harshavardhana 8 years ago committed by GitHub
parent a609a4126c
commit 834007728c
  1. 14
      cmd/fs-v1.go

@ -330,8 +330,7 @@ func (fs fsObjects) getObjectInfo(bucket, object string) (ObjectInfo, error) {
}
}
// Guess content-type from the extension if possible.
return ObjectInfo{
objInfo := ObjectInfo{
Bucket: bucket,
Name: object,
ModTime: fi.ModTime,
@ -340,8 +339,15 @@ func (fs fsObjects) getObjectInfo(bucket, object string) (ObjectInfo, error) {
MD5Sum: fsMeta.Meta["md5Sum"],
ContentType: fsMeta.Meta["content-type"],
ContentEncoding: fsMeta.Meta["content-encoding"],
UserDefined: fsMeta.Meta,
}, nil
}
// md5Sum has already been extracted into objInfo.MD5Sum. We
// need to remove it from fsMeta.Meta to avoid it from appearing as
// part of response headers. e.g, X-Minio-* or X-Amz-*.
delete(fsMeta.Meta, "md5Sum")
objInfo.UserDefined = fsMeta.Meta
return objInfo, nil
}
// GetObjectInfo - get object info.

Loading…
Cancel
Save