Skip to content
This repository was archived by the owner on Jul 31, 2025. It is now read-only.

aws: Add config option to unmarshal API response header maps to normalized lower case map keys#3033

Merged
skmcgrail merged 12 commits intoaws:masterfrom
skmcgrail:s3/headers
Jan 7, 2020
Merged

aws: Add config option to unmarshal API response header maps to normalized lower case map keys#3033
skmcgrail merged 12 commits intoaws:masterfrom
skmcgrail:s3/headers

Conversation

@skmcgrail
Copy link
Copy Markdown
Member

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.

@skmcgrail skmcgrail requested a review from jasdel December 19, 2019 19:14
Copy link
Copy Markdown
Contributor

@skotambkar skotambkar left a 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.

@jasdel jasdel added the needs-review This issue or pull request needs review from a core team member. label Dec 31, 2019
Copy link
Copy Markdown
Contributor

@jasdel jasdel left a 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.

@jasdel jasdel removed the needs-review This issue or pull request needs review from a core team member. label Jan 2, 2020
@skmcgrail skmcgrail requested a review from jasdel January 6, 2020 22:02
@jasdel
Copy link
Copy Markdown
Contributor

jasdel commented Jan 6, 2020

Would be good to add CHANGELOG_PENDING.md entry

@skmcgrail skmcgrail changed the title Add Support for Normalizing REST Location Headers aws: Add configuration option to unmarshal API response header maps to normalized lower case map keys Jan 7, 2020
@skmcgrail skmcgrail changed the title aws: Add configuration option to unmarshal API response header maps to normalized lower case map keys aws: Add config option to unmarshal API response header maps to normalized lower case map keys Jan 7, 2020
@skmcgrail skmcgrail merged commit 172af2f into aws:master Jan 7, 2020
@skmcgrail skmcgrail deleted the s3/headers branch January 7, 2020 18:40
aws-sdk-go-automation pushed a commit that referenced this pull request Jan 7, 2020
===

### 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)
aws-sdk-go-automation added a commit that referenced this pull request Jan 7, 2020
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)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants