-
Notifications
You must be signed in to change notification settings - Fork 6
Add isNoHost function and add "no host" check for Go 1.7.6 on Windows #29
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
base: master
Are you sure you want to change the base?
Conversation
|
Sorry for some operation mistakes of this pull request(close, reopen, ... ). |
|
Hi, just got back from vacation. Will review your change today or tomorrow. Thanks for pull request! |
|
Hi, Thanks again for the pull request and patience. Note I don't have any way to test the library on Windows. From what I understood the problem is that on windows literal error value is different and the code does not enter correct branch and returns invalid value. |
|
I add "isNoHost" function to avoid code duplication because there were two "no host" checks. And if other "no host" case found, I will have to do so, too. |
It fails due to miekg's dns package requirements.
|
@zaccone Could you reply to my opinion? |
I want to use this library, but unfortunately I have to use Go 1.7.6 on Windows/Linux.
On Windows, in case of "no such host", net.DNSError.Err is "dnsquery: DNS name does not exist".
(if Go 1.8.3 on Windows, "no such host")
So, even if expected result is "none", spf.CheckHost returns "temperror".
This pull request is a fix for this case.