You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When using signatureVersion "s3" the call to s3.deleteObjects() fails with InvalidRequest: Missing required header for this request: Content-MD5
Is the issue in the browser/Node.js?
Node.js
If on Node.js, are you running this on AWS Lambda?
No
Additional context
The change was introduced in this PR https://github.com/aws/aws-sdk-js/pull/3799/files. When a request transitions to the build state an event handler is triggered that will not place the Content-MD5 header to the request. Prior to this PR, it would have always set it. The new behaviour seems wrong because for any other s3 operation besides s3.deleteObjects() that needs to set this header, the event handler does set it. When extracting the rules in
, it will also remain unset, because of the signature version.
I am aware that I may be wrong and this may be intended. I searched the docs in order to get an answer and found nothing. Would you be so kind to provide an explanation or maybe point me to some docs I have missed?
The text was updated successfully, but these errors were encountered:
@cristian-marinescu Thank you for reporting this issue and the detailed analytics. The root of this issue is that ContentMD5 is not reset in the DeleteObjects model, so the code believe the header is not applicable, even if models says it requires contentMD5 header. I will put up a fix soon
Confirm by changing [ ] to [x] below to ensure that it's a bug:
Describe the bug
When using signatureVersion "s3" the call to
s3.deleteObjects()
fails withInvalidRequest: Missing required header for this request: Content-MD5
Is the issue in the browser/Node.js?
Node.js
If on Node.js, are you running this on AWS Lambda?
No
Details of the browser/Node.js version
v12.10.0
SDK version number
2.974.0
To Reproduce (observed behavior)
Expected behavior
The API call works.
Additional context
The change was introduced in this PR https://github.com/aws/aws-sdk-js/pull/3799/files. When a request transitions to the
build
state an event handler is triggered that will not place theContent-MD5
header to the request. Prior to this PR, it would have always set it. The new behaviour seems wrong because for any other s3 operation besidess3.deleteObjects()
that needs to set this header, the event handler does set it. When extracting the rules inaws-sdk-js/lib/services/s3.js
Line 458 in 223bd59
rules.ContentMD5
is undefined, because, for this operation, it is not present in the S3 Service Model.After
aws-sdk-js/lib/event_listeners.js
Line 135 in 223bd59
I am aware that I may be wrong and this may be intended. I searched the docs in order to get an answer and found nothing. Would you be so kind to provide an explanation or maybe point me to some docs I have missed?
The text was updated successfully, but these errors were encountered: