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

Fix EC2Metadata Client overriding http.DefaultClient incorrectly #506

Merged
merged 1 commit into from
Jan 14, 2016

Conversation

jasdel
Copy link
Contributor

@jasdel jasdel commented Jan 14, 2016

The EC2Metadata Client was incorrectly overriding the http.DefaultClient
when users had modified the default client's parameters. The metadata
client will now only set its alternate dial timeout if no http client
was provided, or if the provided client was never modified from the
original http.Client{}.

Also updates the logic so DefaultTransport is reused instead of
hardcoded.

Addresses #504

The EC2Metadata Client was incorrectly overriding the http.DefaultClient
when users had modified the default client's parameters. The metadata
client will now only set its alternate dial timeout if no http client
was provided, or if the provided client was never modified from the
original http.Client{}.

Also updates the logic so DefaultTransport is reused instead of
hardcoded.

Fix #504
@xibz
Copy link
Contributor

xibz commented Jan 14, 2016

Looks good.

xibz added a commit that referenced this pull request Jan 14, 2016
Fix EC2Metadata Client overriding http.DefaultClient incorrectly
@xibz xibz merged commit 833c9f7 into master Jan 14, 2016
jasdel added a commit that referenced this pull request Jan 14, 2016
@jasdel jasdel deleted the fixIssue504 branch January 15, 2016 04:19
skotambkar pushed a commit to skotambkar/aws-sdk-go that referenced this pull request May 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants