Azure / azure-sdk-for-net

This repository is for active development of the Azure SDK for .NET. For consumers of the SDK we recommend visiting our public developer docs at https://learn.microsoft.com/dotnet/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-net.
MIT License
5.47k stars 4.8k forks source link

BlobClient.SetHttpHeadersAsync overriding ContentMD5 #43467

Open MoeHamdan opened 6 months ago

MoeHamdan commented 6 months ago

Library name and version

Azure.Storage.Blobs 12.19.1.0

Describe the bug

BlobClient.Upload is saving ContentMD5. However later on I am using SetHttpHeadersAsync to set the content type, this is overriding the ContentMD5 and setting it to empty.

Expected behavior

The SetHttpHeadersAsync should not override the ContentMD5 to the blob.

Actual behavior

The SetHttpHeadersAsync overriding ContentMD5.

Reproduction Steps

Upload file using BlobClient.UploadAsync method execute SetHttpHeadersAsync to set content type

Environment

Debain 10, the code i deployed on docker image using kubernetes.

github-actions[bot] commented 6 months ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @xgithubtriage.