Repository navigation
CLDSRV-1075: Accept x-amz-checksum-mode in any letter case on GetObject and HeadObject - #6400
Draft
anurag4DSB wants to merge 1 commit into
Draft
anurag4DSB wants to merge 1 commit into
anurag4DSB wants to merge 1 commit into
Conversation
…ject Amazon S3 matches the value of x-amz-checksum-mode without regard to case, and the AWS SDK for C++ sends "enabled" on every GetObject. The handlers compared it with "ENABLED" exactly, so those requests failed with 400 InvalidArgument. Compare the value in upper case instead. Any value that is not a case variant of ENABLED is still rejected as before.
Contributor
Hello anurag4dsb,My role is to assist you with the merge of this Available options
Available commands
Status report is not available. |
Contributor
Missing Jira issueIt is mandatory to specify a Jira issue in the source branch name I could not find such an issue in |
| query: {}, | ||
| }; | ||
| objectGet(authInfo, req, false, log, err => { | ||
| assert.strictEqual(err.is.NoSuchKey, true); |
There was a problem hiding this comment.
Prefer asserting the error message so a failure shows the actual error name instead of false !== true. Same for the new NoSuchKey test in tests/unit/api/objectHead.js (line 829).
Suggested change
| assert.strictEqual(err.is.NoSuchKey, true); | |
| assert.strictEqual(err.message, 'NoSuchKey'); |
This branch has not been deployed
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.
TL;DR: GetObject and HeadObject accept
x-amz-checksum-modein any letter case, as AWS does. Todayenabled, which the AWS SDK for C++ sends by default, is answered400 InvalidArgument, so every read from a client built on that SDK fails.Context / Why
CLDSRV-1075.
development/9.6). 9.2.x and 9.3.x do not read the header.🧩 Approach
🔍 Review focus
objectGet.js,objectHead.js: any value that is not a case variant ofENABLED(DISABLED,foo, an empty value) must still answer 400, and responses without the header must not change.🧪 How to test
tests/unit/api/objectGet.jsandobjectHead.js, and functional tests inobject/get.jsandobject/objectHead.js. They coverenabled,Enabled,ENABLED, a ranged GET withenabled(206), and the rejected values.🔗 References
Draft: the branch name has no ticket key yet, and the forward-port to 9.5 and 9.6 is for Bert-E.