Skip to content

[v2] Fix bug with response_checksum_validation not being respected when using CRT - #10515

Open
aemous wants to merge 2 commits into
v2from
crt_validate_response
Open

[v2] Fix bug with response_checksum_validation not being respected when using CRT#10515
aemous wants to merge 2 commits into
v2from
crt_validate_response

Conversation

@aemous

@aemous aemous commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Description of changes:

  • Updated vendored s3transfer so that response_checksum_validation is respected when using CRT client to perform S3 downloads.
  • Added a regression test to cover this new behavior.

Description of tests:

  • Ran and passed all tests (see GitHub Actions).
  • Verified that regression test fails without the fix, and passes with the fix.
  • Performed manual integration tests and verified the expected headers in the debug logs (results below)

Manual integration test results:

Without fix (response_checksum_validation=when_required)

GET
/tox.ini

amz-sdk-invocation-id:REDACTED
amz-sdk-request:attempt=1
content-length:0
host:REDACTED
if-match:"REDACTED"
range:bytes=0-33481
x-amz-checksum-mode:enabled
x-amz-content-sha256:UNSIGNED-PAYLOAD
x-amz-date:20260730T202516Z
x-amz-security-token:REDACTED

amz-sdk-invocation-id;amz-sdk-request;content-length;host;if-match;range;x-amz-checksum-mode;x-amz-content-sha256;x-amz-date;x-amz-security-token
UNSIGNED-PAYLOAD

Without fix (response_checksum_validation=when_supported)

GET
/tox.ini

amz-sdk-invocation-id:REDACTED
amz-sdk-request:attempt=1
content-length:0
host:REDACTED
if-match:"REDACTED"
range:bytes=0-33481
x-amz-checksum-mode:enabled
x-amz-content-sha256:UNSIGNED-PAYLOAD
x-amz-date:20260730T202857Z
x-amz-security-token:REDACTED

amz-sdk-invocation-id;amz-sdk-request;content-length;host;if-match;range;x-amz-checksum-mode;x-amz-content-sha256;x-amz-date;x-amz-security-token
UNSIGNED-PAYLOAD

With fix (response_checksum_validation=when_required)

GET
/tox.ini

amz-sdk-invocation-id:REDACTED
amz-sdk-request:attempt=1
content-length:0
host:REDACTED
range:bytes=0-8388607
x-amz-content-sha256:UNSIGNED-PAYLOAD
x-amz-date:20260730T202352Z
x-amz-security-token:REDACTED

amz-sdk-invocation-id;amz-sdk-request;content-length;host;range;x-amz-content-sha256;x-amz-date;x-amz-security-token
UNSIGNED-PAYLOAD

With fix (response_checksum_validation=when_supported)

GET
/tox.ini

amz-sdk-invocation-id:REDACTED
amz-sdk-request:attempt=1
content-length:0
host:REDACTED
if-match:"REDACTED"
range:bytes=0-33481
x-amz-checksum-mode:enabled
x-amz-content-sha256:UNSIGNED-PAYLOAD
x-amz-date:20260730T203001Z
x-amz-security-token:REDACTED

amz-sdk-invocation-id;amz-sdk-request;content-length;host;if-match;range;x-amz-checksum-mode;x-amz-content-sha256;x-amz-date;x-amz-security-token
UNSIGNED-PAYLOAD

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@aemous
aemous requested a review from a team as a code owner July 30, 2026 20:57
@aemous aemous added s3 s3transfer v2 customization Issues related to CLI customizations (located in /awscli/customizations) labels Jul 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

customization Issues related to CLI customizations (located in /awscli/customizations) s3transfer s3 v2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant