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
Content-Length isn't sent for default node http client #8903
Comments
Sorry, I can not reproduce the issue with the snippet you provided. If you are using the SDK's default http client, it shouldn't have failed as node-fetch will add the 'Content-Length' header back. Also we have plenty of tests covering this scenario. |
I think im having the same issue. I can upload a string to blob storage fine, but when i try to upload a buffer or a stream something breaks and i get this Auth error. A bug in content length headers could be the culprit. |
@thesiti92 @Nurchik import { setLogLevel } from "@azure/logger";
setLogLevel("info"); It succeeded and from the log we can see that content length was set correctly.
Also as I mentioned, we have plenty of test cases covering the buffer uploading scenario. |
ok will do. im not exactly sure if my issue is related to content-length, but i'll post here after and give you more info. Can make a new issue if need be. Thanks for the quick response! |
ok the issue was not to do with content length, but something is messing up the HMAC authentication, not sure if its you guys or me. |
Opened a new issue #9300 |
Nice catch on the |
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @xgithubtriage. |
Close as fix released. |
Describe the bug
Because of the workaround for bug with axios axios/axios#2107 when we are:
the Content-Length header gets removed from the headers of the request causing MAC signature mismatch. This happens because the local signature calculation is performed before the header removal here and at the server this field is absent.
To Reproduce
Steps to reproduce the behavior:
Buffer
blobExpected behavior
Successful blob upload
Error Response
Code snippet to reproduce
The text was updated successfully, but these errors were encountered: