-
Notifications
You must be signed in to change notification settings - Fork 331
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Check both Content-MD5 and x-ms-blob-content-md5 #2487
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a test case to cover it.
Besides that, please consider that API which support Content-MD5 and x-ms-blob-content-md5.
Could you expand on your suggestion? I believe that for block blobs |
@blueww Is there any way to move this PR forward? I don't believe that the test you suggested is possible with the SDK. |
Please refer this test case for how to add header to request send from Storage JS SDK with customized policy.
The customized policy class is defined in https://github.com/Azure/Azurite/blob/main/tests/blob/RequestPolicy/OPTIONSRequestPolicyFactory.ts The sample test case changes several items in the request, if only for header, see a more simple guild in #2462 (comment) |
@blueww I added the suggested test -- please take a look. |
// Customize HTTP requests and responses by overriding sendRequest | ||
// Parameter request is Azure.WebResource type | ||
async sendRequest(request: WebResource) { | ||
request.headers.set("x-ms-blob-content-md5", `${this.md5}`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be better to write a more generic policy to add a header from input header name and value, then other coming test cases can also use it, instead of each header has seperate class to add header.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
No description provided.