Skip to content

CLDSRV-1090: Remove aws-chunked from Content-Encoding without a leftover separator - #6394

Open
tcarmet wants to merge 2 commits into
development/9.3from
bugfix/CLDSRV-1090-aws-chunked-trailing-comma
Open

tcarmet wants to merge 2 commits into
development/9.3from
bugfix/CLDSRV-1090-aws-chunked-trailing-comma

Conversation

@tcarmet

@tcarmet tcarmet commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

Clients that use streaming uploads with a trailing checksum, which the AWS CLI and botocore do by default over HTTPS, send Content-Encoding: gzip,aws-chunked, and the object was stored and returned as gzip, with a dangling comma. This removes aws-chunked cleanly wherever it appears in the list, and returns Content-Encoding without empty list items so objects already stored with the leftover comma read back as gzip without rewriting their metadata.

@bert-e

bert-e commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

Hello tcarmet,

My role is to assist you with the merge of this
pull request. Please type @bert-e help to get information
on this process, or consult the user documentation.

Available options
name description privileged authored
/after_pull_request Wait for the given pull request id to be merged before continuing with the current one.
/bypass_author_approval Bypass the pull request author's approval ⭐
/bypass_build_status Bypass the build and test status ⭐
/bypass_commit_size Bypass the check on the size of the changeset TBA ⭐
/bypass_incompatible_branch Bypass the check on the source branch prefix ⭐
/bypass_jira_check Bypass the Jira issue check ⭐
/bypass_peer_approval Bypass the pull request peers' approval ⭐
/bypass_leader_approval Bypass the pull request leaders' approval ⭐
/bypass_source_branch_lineage Bypass the cross-branch contamination check ⭐
/approve Instruct Bert-E that the author has approved the pull request. ✍️
/create_pull_requests Allow the creation of integration pull requests.
/create_integration_branches Allow the creation of integration branches.
/no_octopus Prevent Wall-E from doing any octopus merge and use multiple consecutive merge instead
/unanimity Change review acceptance criteria from one reviewer at least to all reviewers
/wait Instruct Bert-E not to run until further notice.
Available commands
name description privileged
/help Print Bert-E's manual in the pull request.
/status Print Bert-E's current status in the pull request.
/clear Remove all comments from Bert-E from the history TBA
/retry Re-start a fresh build TBA
/build Re-start a fresh build TBA
/force_reset Delete integration branches & pull requests, and restart merge process from the beginning.
/reset Try to remove integration branches unless there are commits on them which do not appear on the source branch.

Status report is not available.

@bert-e

bert-e commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

Incorrect fix version

The Fix Version/s in issue CLDSRV-1090 contains:

  • None

Considering where you are trying to merge, I ignored possible hotfix versions and I expected to find:

  • 9.3.34

  • 9.4.21

  • 9.5.11

  • 9.6.0

Please check the Fix Version/s of CLDSRV-1090, or the target
branch of this pull request.

@tcarmet
tcarmet requested a review from a team November 25, 2026 00:14
@tcarmet
tcarmet marked this pull request as ready for review November 25, 2026 00:14
@codecov

codecov Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.63%. Comparing base (b83ca0c) to head (e4416c3).
✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

Files with missing lines Coverage Δ
lib/api/apiUtils/object/createAndStoreObject.js 85.40% <100.00%> (ø)
lib/api/objectCopy.js 93.31% <100.00%> (ø)
lib/services.js 87.53% <100.00%> (-0.54%) ⬇️
lib/utilities/collectResponseHeaders.js 100.00% <100.00%> (ø)
lib/utilities/removeFromCommaSeparatedList.js 100.00% <100.00%> (ø)

... and 2 files with indirect coverage changes

@@                 Coverage Diff                 @@
##           development/9.3    #6394      +/-   ##
===================================================
- Coverage            85.70%   85.63%   -0.08%     
===================================================
  Files                  209      209              
  Lines                13616    13619       +3     
===================================================
- Hits                 11669    11662       -7     
- Misses                1947     1957      +10     
Flag Coverage Δ
file-ft-tests 68.06% <100.00%> (+<0.01%) ⬆️
file-ft-tests-null-compat 68.57% <100.00%> (+<0.01%) ⬆️
kmip-ft-tests 28.29% <61.53%> (+<0.01%) ⬆️
mongo-v0-ft-tests 69.24% <100.00%> (-0.02%) ⬇️
mongo-v1-ft-tests 69.24% <100.00%> (-0.09%) ⬇️
multiple-backend 36.64% <84.61%> (+0.02%) ⬆️
s3c-ft-tests-v0 63.79% <100.00%> (+<0.01%) ⬆️
s3c-ft-tests-v0-null-compat 63.85% <100.00%> (+<0.01%) ⬆️
s3c-ft-tests-v1 63.77% <100.00%> (+<0.01%) ⬆️
sur-tests 35.72% <76.92%> (-0.83%) ⬇️
sur-tests-inflights 37.55% <76.92%> (-0.03%) ⬇️
unit 72.52% <100.00%> (+0.02%) ⬆️
utapi-v2-tests 34.54% <76.92%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@tcarmet
tcarmet added this pull request to stack #6396 November 25, 2026 00:21
@tcarmet
tcarmet force-pushed the bugfix/CLDSRV-1090-aws-chunked-trailing-comma branch 2 times, most recently from 95b89da to 161e7f5 Compare November 25, 2026 00:53
* @return {string} the header without 'aws-chunked' elements, '' if nothing
* else was sent, unchanged if it holds no 'aws-chunked' element
*/
function removeAWSChunked(sourceHeader) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The two methods removeAWSChunked and removeEmptyListElements could benefit from a common helper like removeFromCommaSeparatedList (respectively passing AWS_CHUNKED and '' to it as a parameter).

It's also questionable whether we need specific helpers for each case, even though removeAWSChunked is called three times in the cloudserver code base, they could as well call the generic helper with the proper argument, that would be at least as readable I think.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fair enough, I ended up adding a common helper and calling it directly.

…ver separator

The aws-chunked element was removed with the comma after it only, so
'gzip,aws-chunked', which the AWS CLI and botocore send over HTTPS, was
stored as 'gzip,'. Remove every aws-chunked element of the list along
with its separator and keep the other encodings as sent. CopyObject also
drops empty list elements, so copying an object stored with a leftover
separator stores a clean value.
Objects already stored with a leftover separator, such as 'gzip,', are
returned as 'gzip' on HEAD and GET without rewriting their metadata.
Recipients must ignore empty list elements (RFC 9110, section 5.6.1).
@bert-e

bert-e commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

Incorrect fix version

The Fix Version/s in issue CLDSRV-1090 contains:

  • None

Considering where you are trying to merge, I ignored possible hotfix versions and I expected to find:

  • 9.3.34

  • 9.4.21

  • 9.5.11

  • 9.6.1

Please check the Fix Version/s of CLDSRV-1090, or the target
branch of this pull request.

@tcarmet
tcarmet force-pushed the bugfix/CLDSRV-1090-aws-chunked-trailing-comma branch from 161e7f5 to e4416c3 Compare November 25, 2026 20:46

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants