Azure / Azure/Azurite

stageBlock API does not return Content-MD5

Open
#2,394 1 comment 0 reactions 1 assignee Claimed by @EmmaZhu View on GitHub
alignment blob-storage
Dominant language
TypeScript
Stars
2.3k
Forks
393
Avg merge
1d 20h
Merged PRs (30d)
36

Description

### Which service(blob, file, queue, table) does this issue concern?

Blob

### Which version of the Azurite was used?

3.30.0

### Where do you get Azurite? (npm, DockerHub, NuGet, Visual Studio Code Extension)

DockerHub

### What's the Node.js version?

embedded in container

### What problem was encountered?

stageBlock API always returns `null` in `Content-MD5` header.

### Steps to reproduce the issue?

Invoke `stageBlock` API. `Content-MD5` header is always `null`.

```
INFO ROOT -- {cf1a7f88-2fda-496d-b078-e9a7cbbb8617}: {Starting request to 'https://127.0.0.1:10000/account2/test-container/test-data/4123905f-3265-492b-a6e9-198570d5ea4d?blockid=IjB4MjU2MzI1RUVFMDE0NTQwIi0wMDAwMA%3D%3D&comp=block' at 'Fri, 03 May 2024 18:11:45 GMT'.}
...
INFO ROOT -- {cf1a7f88-2fda-496d-b078-e9a7cbbb8617}: {Response received. Status code = '201', Request ID = '87e6a807-9767-4127-aefc-086bbdcdc162', Content-MD5 = 'null', ETag = 'null', Date = 'Fri, 03 May 2024 18:11:45 GMT'.}
```

Looks like this is marked `TODO` in the code:

https://github.com/Azure/Azurite/blob/main/src/blob/handlers/BlockBlobHandler.ts#L255

### Have you found a mitigation/solution?

Maybe change line 255 to use `calculatedContentMD5`?

```
contentMD5: calculatedContentMD5
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.