fix CopyObject with replace overwriting inline status (#19468)

Fixes #19450 - internal inline-data header can get overwritten
during copy with replace before this fix.
This commit is contained in:
Poorna 2024-04-10 23:42:51 -07:00 committed by GitHub
parent 0c31e61343
commit ffa91f9794
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -147,11 +147,12 @@ func (er erasureObjects) CopyObject(ctx context.Context, srcBucket, srcObject, d
modTime = dstOpts.MTime
fi.ModTime = dstOpts.MTime
}
// check inline before overwriting metadata.
inlineData := fi.InlineData()
fi.Metadata = srcInfo.UserDefined
srcInfo.UserDefined["etag"] = srcInfo.ETag
inlineData := fi.InlineData()
freeVersionID := fi.TierFreeVersionID()
freeVersionMarker := fi.TierFreeVersion()