-
Notifications
You must be signed in to change notification settings - Fork 584
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(clients): lowercase all header names in serializer #1892
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1892 +/- ##
==========================================
+ Coverage 79.30% 79.83% +0.52%
==========================================
Files 368 368
Lines 15132 15543 +411
Branches 3222 3364 +142
==========================================
+ Hits 12001 12409 +408
- Misses 3131 3134 +3
Continue to review full report at Codecov.
|
CI failed, protocol_tests need to be updated
The HTTP request class doesn't have any implementations to insure case-insensitivity of the http headers. So we need to be mindful when populating these headers. Otherwise, the reqeust signature will be messed up. This change will ensure the protocol-specific default headers like content-type will be overriden by the serialized header if exists. For other headers added through middleware stack either by customization or users, it wouldn't affect signing or sending as long as the request doesn't contain same header names in different casing. All the internal headers will be consistent. But users should be careful when they are adding their own headers. We don't add middleware to lowercase all headers to prevent alternating the users' customizations. Ref: aws#1800
a6d4ba6
to
9407d5e
Compare
9407d5e
to
657c5c2
Compare
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Integration test is confirmed to pass: yarn test:integration-legacy
yarn run v1.22.5
$ cucumber-js --fail-fast
........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
152 scenarios (152 passed)
528 steps (528 passed)
2m57.222s
Done in 181.85s. /cc @kstich |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread. |
The HTTP request class doesn't have any implementations to insure
case-insensitivity of the http headers. So we need to be mindful
when populating these headers. Otherwise, the reqeust signature
will be messed up. This change will ensure the protocol-specific
default headers like content-type will be overriden by the serialized
header if exists.
For other headers added through middleware stack either by
customization or users, it wouldn't affect signing or sending as long
as the request doesn't contain same header names in different casing.
All the internal headers will be consistent. But users should be
careful when they are adding their own headers.
We don't add middleware to lowercase all headers to prevent
alternating the users' customizations.
Fixes: #1800
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.