Make sure to filter out internal metadata (#5601)

Currently we reply back `X-Minio-Internal` values
back to the client for an encrypted object, we should
filter these out and only reply AWS compatible headers.
This commit is contained in:
Harshavardhana 2018-03-01 16:15:53 -08:00 committed by GitHub
parent 5f37988db5
commit d71b1d25f8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -89,6 +89,11 @@ func setObjectHeaders(w http.ResponseWriter, objInfo ObjectInfo, contentRange *h
// Set all other user defined metadata.
for k, v := range objInfo.UserDefined {
if hasPrefix(k, ReservedMetadataPrefix) {
// Do not need to send any internal metadata
// values to client.
continue
}
w.Header().Set(k, v)
}