-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
aws: Add config option to unmarshal API response header maps to normalized lower case map keys #3033
Conversation
40078df
to
9ce78b9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, have minor suggestions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should consider if normalized headers should apply to HTTP header marshal, not just unmarshal.
Also CHANGELOG_PENDING would be good for this, calling out fixes to related issues.
… contain user input when sent or received from a service.
Would be good to add CHANGELOG_PENDING.md entry |
=== ### Service Client Updates * `service/AWSMigrationHub`: Updates service API, documentation, and paginators * `service/codebuild`: Updates service API and documentation * Add encryption key override to StartBuild API in AWS CodeBuild. * `service/xray`: Updates service documentation * Documentation updates for xray ### SDK Enhancements * `aws`: Add configuration option enable the SDK to unmarshal API response header maps to normalized lower case map keys. ([#3033](#3033)) * Setting `aws.Config.LowerCaseHeaderMaps` to `true` will result in S3's X-Amz-Meta prefixed header to be unmarshaled to lower case Metadata member's map keys. ### SDK Bugs * `aws/ec2metadata` : Reduces request timeout for EC2Metadata client along with maximum number of retries ([#3066](#3066)) * Reduces latency while fetching response from EC2Metadata client running in a container to around 3 seconds * Fixes [#2972](#2972)
Release v1.27.2 (2020-01-07) === ### Service Client Updates * `service/AWSMigrationHub`: Updates service API, documentation, and paginators * `service/codebuild`: Updates service API and documentation * Add encryption key override to StartBuild API in AWS CodeBuild. * `service/xray`: Updates service documentation * Documentation updates for xray ### SDK Enhancements * `aws`: Add configuration option enable the SDK to unmarshal API response header maps to normalized lower case map keys. ([#3033](#3033)) * Setting `aws.Config.LowerCaseHeaderMaps` to `true` will result in S3's X-Amz-Meta prefixed header to be unmarshaled to lower case Metadata member's map keys. ### SDK Bugs * `aws/ec2metadata` : Reduces request timeout for EC2Metadata client along with maximum number of retries ([#3066](#3066)) * Reduces latency while fetching response from EC2Metadata client running in a container to around 3 seconds * Fixes [#2972](#2972)
This adds support for normalizing AWS REST encoded/decoded headers. This resolves an outstanding customer ask #445 which documents the behavior of both Go
net/http
layer canonicalizing headers that are received in HTTP responses, in addition to the AWS SDK also enforcing that these returned headers be canonicalized as well. Enabling this flag will result in these types of headers being sent as lower-cased to AWS services, and responses targeting the header location will have the headers lower-cased during unmarshaling.