split ExtAcpKey to ExtAmzOwnerKey and ExtAmzAclKey to avoid unn… (#3824)
split `ExtAcpKey` to `ExtAmzOwnerKey` and `ExtAmzAclKey` to avoid unnecessary `json.Unmarshal()` call Signed-off-by: changlin.shi <changlin.shi@ly.com> Signed-off-by: changlin.shi <changlin.shi@ly.com>
This commit is contained in:
@@ -375,10 +375,16 @@ func SaveAmzMetaData(r *http.Request, existing map[string][]byte, isReplace bool
|
||||
}
|
||||
}
|
||||
|
||||
//acp
|
||||
acp := r.Header.Get(s3_constants.ExtAcpKey)
|
||||
if len(acp) > 0 {
|
||||
metadata[s3_constants.ExtAcpKey] = []byte(acp)
|
||||
//acp-owner
|
||||
acpOwner := r.Header.Get(s3_constants.ExtAmzOwnerKey)
|
||||
if len(acpOwner) > 0 {
|
||||
metadata[s3_constants.ExtAmzOwnerKey] = []byte(acpOwner)
|
||||
}
|
||||
|
||||
//acp-grants
|
||||
acpGrants := r.Header.Get(s3_constants.ExtAmzAclKey)
|
||||
if len(acpOwner) > 0 {
|
||||
metadata[s3_constants.ExtAmzAclKey] = []byte(acpGrants)
|
||||
}
|
||||
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user