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: only use dns cache if specified #83

Merged
merged 1 commit into from
Oct 12, 2023
Merged

fix: only use dns cache if specified #83

merged 1 commit into from
Oct 12, 2023

Conversation

adityathebe
Copy link
Member

  • fix the host dervied from the URL

* fix the host dervied from the URL
@@ -209,11 +209,13 @@ func (c *Client) roundTrip(r *Request) (resp *Response, err error) {
} else if h := r.getHeader("Host"); h != "" {
host = h
} else {
host = r.url.Host
host = r.url.Hostname()
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Host would be localhost:port and DNS lookup would take about 3-4 seconds before failing.

@adityathebe adityathebe merged commit 79d631a into master Oct 12, 2023
5 checks passed
@github-actions
Copy link

🎉 This PR is included in version 1.14.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@adityathebe adityathebe deleted the fix/dns-cache branch October 16, 2023 08:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant