-
Notifications
You must be signed in to change notification settings - Fork 586
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
chore(middleware-flexible-checksums): use RequestChecksumCalculation and ResponseChecksumValidation without interceptor middleware #6484
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
trivikr
force-pushed
the
middleware-flexchecks
branch
from
September 17, 2024 14:36
d718416
to
85082a3
Compare
kuhe
reviewed
Sep 17, 2024
kuhe
reviewed
Sep 17, 2024
packages/middleware-flexible-checksums/src/getChecksumAlgorithmForRequest.ts
Outdated
Show resolved
Hide resolved
This reverts commit ba24558. The ResponseChecksumValidation should be consumed in request middleware.
trivikr
force-pushed
the
middleware-flexchecks
branch
from
September 17, 2024 20:31
afadedb
to
08bec3a
Compare
trivikr
force-pushed
the
middleware-flexchecks
branch
from
September 17, 2024 21:11
afc6268
to
c4d9e62
Compare
Converting to draft, since this solution consumes the steam during validation import { S3 } from "../aws-sdk-js-v3/clients/client-s3/dist-cjs/index.js";
// WHEN_SUPPORTED is default.
const client = new S3({
// responseChecksumValidation: "WHEN_REQUIRED",
});
const { Body } = await client.getObject({
Bucket: "test-flexible-checksums-v2",
Key: "hello-world.txt",
// ChecksumMode: "ENABLED",
});
// Prints nothing in current setup.
// Prints "Hello World" when responseChecksumValidation is "WHEN_REQUIRED"
// Prints nothing when responseChecksumValidation is "WHEN_REQUIRED" and ChecksumMode is "ENABLED"
console.log(await Body.transformToString()); An alternative is being tested in #6492 |
trivikr
changed the title
chore(middleware-flexible-checksums): use RequestChecksumCalculation and ResponseChecksumValidation
chore(middleware-flexible-checksums): use RequestChecksumCalculation and ResponseChecksumValidation without interceptor middleware
Sep 18, 2024
Superceded by #6492 |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue
Internal JS-5396
Description
Uses values in RequestChecksumCalculation and ResponseChecksumValidation to decide flexible checksums algorithm.
Also deprecates MD5, and sets CRC32 as default.
Testing
Unit testing
Also, verified that checksums are computed by default
Output
An integration test will be added in S3 as a follow-up.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.