Skip to content
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/request: Fix bug where the host header would not reflect changes to the endpoint URL. #3102

Merged
merged 4 commits into from Jan 30, 2020

Conversation

skmcgrail
Copy link
Member

@skmcgrail skmcgrail commented Jan 29, 2020

net/http.Request Host member was only computed during initial request creation. For services such as S3 where endpoint modifications occur for referencing buckets using host-style addressing, the Host field on the HTTP request was not getting updated to reflect changes to the url.URL Host field. This change moves the computation of the Host member during the send step, right before computing the signing signature.

@skmcgrail skmcgrail added the needs-review This issue or pull request needs review from a core team member. label Jan 29, 2020
@skmcgrail skmcgrail requested a review from jasdel January 29, 2020 19:17
@jasdel
Copy link
Contributor

jasdel commented Jan 29, 2020

will want to add a Change log referencing that bug as well.

@skmcgrail skmcgrail merged commit 1edb62f into aws:master Jan 30, 2020
@skmcgrail skmcgrail deleted the bug/host branch January 30, 2020 00:31
aws-sdk-go-automation pushed a commit that referenced this pull request Feb 4, 2020
===

### Service Client Updates
* `service/cloudfront`: Updates service documentation
  * Documentation updates for CloudFront
* `service/ec2`: Updates service API and documentation
  * Amazon VPC Flow Logs adds support for 1-minute aggregation intervals.
* `service/iot`: Updates service API
  * Updated ThrottlingException documentation to report that the error code is 400, and not 429, to reflect actual system behaviour.
* `service/kafka`: Updates service API, documentation, and paginators
* `service/ssm`: Updates service API and documentation
  * This feature ensures that an instance is patched up to the available patches on a particular date. It can be enabled by selecting the 'ApproveUntilDate' option as the auto-approval rule while creating the patch baseline. ApproveUntilDate - The cutoff date for auto approval of released patches. Any patches released on or before this date will be installed automatically.
* `service/storagegateway`: Updates service API
  * Adding KVM as a support hypervisor
* `service/workmail`: Updates service API and documentation
  * This release adds support for tagging Amazon WorkMail organizations.

### SDK Enhancements
* `aws/request`: Add support for EC2 specific throttle exception code
  * Adds support for the EC2ThrottledException throttling exception code. The SDK will now treat this error code as throttling.

### SDK Bugs
* `aws/request`: Fixes an issue where the HTTP host header did not reflect changes to the endpoint URL ([#3102](#3102))
  * Fixes [#3093](#3093)
aws-sdk-go-automation added a commit that referenced this pull request Feb 4, 2020
Release v1.28.10 (2020-02-04)
===

### Service Client Updates
* `service/cloudfront`: Updates service documentation
  * Documentation updates for CloudFront
* `service/ec2`: Updates service API and documentation
  * Amazon VPC Flow Logs adds support for 1-minute aggregation intervals.
* `service/iot`: Updates service API
  * Updated ThrottlingException documentation to report that the error code is 400, and not 429, to reflect actual system behaviour.
* `service/kafka`: Updates service API, documentation, and paginators
* `service/ssm`: Updates service API and documentation
  * This feature ensures that an instance is patched up to the available patches on a particular date. It can be enabled by selecting the 'ApproveUntilDate' option as the auto-approval rule while creating the patch baseline. ApproveUntilDate - The cutoff date for auto approval of released patches. Any patches released on or before this date will be installed automatically.
* `service/storagegateway`: Updates service API
  * Adding KVM as a support hypervisor
* `service/workmail`: Updates service API and documentation
  * This release adds support for tagging Amazon WorkMail organizations.

### SDK Enhancements
* `aws/request`: Add support for EC2 specific throttle exception code
  * Adds support for the EC2ThrottledException throttling exception code. The SDK will now treat this error code as throttling.

### SDK Bugs
* `aws/request`: Fixes an issue where the HTTP host header did not reflect changes to the endpoint URL ([#3102](#3102))
  * Fixes [#3093](#3093)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-review This issue or pull request needs review from a core team member.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

S3 endpoint with port produces malformed request for virtual host style requests
2 participants