mirror of
https://github.com/minio/minio.git
synced 2025-02-26 12:59:17 -05:00
fs: Do not print redundant md5Sum response header. (#3369)
For both GET and HEAD requests.
This commit is contained in:
parent
a609a4126c
commit
834007728c
14
cmd/fs-v1.go
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.
|
objInfo := ObjectInfo{
|
||||||
return ObjectInfo{
|
|
||||||
Bucket: bucket,
|
Bucket: bucket,
|
||||||
Name: object,
|
Name: object,
|
||||||
ModTime: fi.ModTime,
|
ModTime: fi.ModTime,
|
||||||
@ -340,8 +339,15 @@ func (fs fsObjects) getObjectInfo(bucket, object string) (ObjectInfo, error) {
|
|||||||
MD5Sum: fsMeta.Meta["md5Sum"],
|
MD5Sum: fsMeta.Meta["md5Sum"],
|
||||||
ContentType: fsMeta.Meta["content-type"],
|
ContentType: fsMeta.Meta["content-type"],
|
||||||
ContentEncoding: fsMeta.Meta["content-encoding"],
|
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.
|
// GetObjectInfo - get object info.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user