From fe9e2566d0c0474ab121f71af221d44bb1179d14 Mon Sep 17 00:00:00 2001 From: "Kamat, Trivikram" <16024985+trivikr@users.noreply.github.com> Date: Fri, 4 Oct 2024 16:03:48 +0000 Subject: [PATCH] fix: revert to use CRC32 for default checksum algorithm This reverts commit aad6e6f02ffa001a3048ce150aa8a8386f38ea71. --- packages/middleware-flexible-checksums/src/constants.ts | 4 ++-- private/aws-middleware-test/src/middleware-serde.spec.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/middleware-flexible-checksums/src/constants.ts b/packages/middleware-flexible-checksums/src/constants.ts index 688febe373994..eaa64c32ca396 100644 --- a/packages/middleware-flexible-checksums/src/constants.ts +++ b/packages/middleware-flexible-checksums/src/constants.ts @@ -53,7 +53,7 @@ export const DEFAULT_RESPONSE_CHECKSUM_VALIDATION = RequestChecksumCalculation.W */ export enum ChecksumAlgorithm { /** - * @deprecated Use {@link ChecksumAlgorithm.SHA256} instead. + * @deprecated Use {@link ChecksumAlgorithm.CRC32} instead. */ MD5 = "MD5", CRC32 = "CRC32", @@ -73,7 +73,7 @@ export enum ChecksumLocation { /** * @internal */ -export const DEFAULT_CHECKSUM_ALGORITHM = ChecksumAlgorithm.SHA256; +export const DEFAULT_CHECKSUM_ALGORITHM = ChecksumAlgorithm.CRC32; /** * @internal diff --git a/private/aws-middleware-test/src/middleware-serde.spec.ts b/private/aws-middleware-test/src/middleware-serde.spec.ts index bceb1d063fc9f..7c7ad433d698e 100644 --- a/private/aws-middleware-test/src/middleware-serde.spec.ts +++ b/private/aws-middleware-test/src/middleware-serde.spec.ts @@ -20,7 +20,7 @@ describe("middleware-serde", () => { "x-amz-acl": "private", "content-length": "509", Expect: "100-continue", - "x-amz-checksum-sha256": "wKiXgOGqxd+hdgTp4lYW57q7oLZV2xib5JtMNSVDuyI=", + "x-amz-checksum-crc32": "XnKFaw==", host: "s3.us-west-2.amazonaws.com", "x-amz-content-sha256": "c0a89780e1aac5dfa17604e9e25616e7babba0b655db189be49b4c352543bb22", },