fix(ci): disable aws-chunked encoding for OSS uploads#43
Merged
Conversation
AWS CLI v2.23 enabled default integrity protections that wrap PUT bodies in aws-chunked encoding with a CRC32 trailer. Aliyun OSS rejects this (InvalidArgument: aws-chunked encoding is not supported with the specified x-amz-content-sha256 value). Set request_checksum_calculation / response_checksum_validation to when_required so the CLI only applies trailer-based checksums when an operation explicitly demands them. PUT object falls back to plain sigv4-signed bodies. Object integrity is still anchored elsewhere (SHA256 in checksums.txt verified by install.sh). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
After #42 fixed virtual-hosted addressing, the next mirror run failed with:
AWS CLI v2.23 enabled default integrity protections that wrap PUT bodies in
aws-chunkedtransfer encoding with a CRC32 trailer. Aliyun OSS S3-compat doesn't accept that encoding.Fix
Set
request_checksum_calculationandresponse_checksum_validationtowhen_requiredso the CLI only adds trailer checksums when an operation requires them. PUT object reverts to plain sigv4-signed bodies that OSS accepts.Object integrity is unaffected —
install.shstill verifies SHA256 againstchecksums.txtafter download.Test plan
mirror install.shsucceeds;curl https://flashduty-public.oss-cn-beijing.aliyuncs.com/flashduty-runner/install.shreturns 200 with matching sha256.🤖 Generated with Claude Code