remove Content-MD5 on Range requests (#11611)

This removes the Content-MD5 response header on Range requests in Azure
Gateway mode. The partial content MD5 doesn't match the full object MD5
in metadata.
This commit is contained in:
Petr Tichý
2021-02-24 04:32:56 +01:00
committed by GitHub
parent 67b20125e4
commit 14aef52004

View File

@@ -793,6 +793,10 @@ func (a *azureObjects) GetObjectNInfo(ctx context.Context, bucket, object string
return nil, err
}
if startOffset != 0 || length != objInfo.Size {
delete(objInfo.UserDefined, "Content-MD5")
}
pr, pw := io.Pipe()
go func() {
err := a.GetObject(ctx, bucket, object, startOffset, length, pw, objInfo.InnerETag, opts)