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: let bad-host-tests pass when there is DNS error redirection #1166

Merged
merged 1 commit into from
Jan 25, 2025

Conversation

Jerry-Terrasse
Copy link
Contributor

@Jerry-Terrasse Jerry-Terrasse commented Jan 25, 2025

Reason

In bad host tests, when the DNS server is configured with error redirection, it may return a fake IP such as 127.0.0.2 instead of an NXDOMAIN response, which causes the tests fail. #1165

Solution

Add a "OR" condition to those tests, both CURLE_COULDNT_RESOLVE_HOST (6) and CURLE_COULDNT_CONNECT (7) should pass.

Copy link
Member

@COM8 COM8 left a comment

Choose a reason for hiding this comment

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

Awesome! Thanks for taking care of this!

@COM8 COM8 merged commit 953bef6 into libcpr:master Jan 25, 2025
42 of 44 checks passed
COM8 added a commit that referenced this pull request Feb 17, 2025
fix: let bad-host-tests pass when there is DNS error redirection
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