From 14aef520045b8ecd4d0c892472980cb23793a39c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Tich=C3=BD?= Date: Wed, 24 Feb 2021 04:32:56 +0100 Subject: [PATCH] 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. --- cmd/gateway/azure/gateway-azure.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmd/gateway/azure/gateway-azure.go b/cmd/gateway/azure/gateway-azure.go index df9edfa03..016ccbfa7 100644 --- a/cmd/gateway/azure/gateway-azure.go +++ b/cmd/gateway/azure/gateway-azure.go @@ -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)