Add isNoHost function and add "no host" check for Go 1.7.6 on Windows#29
Add isNoHost function and add "no host" check for Go 1.7.6 on Windows#29cedar10bits wants to merge 7 commits intozaccone:masterfrom cedar10bits:win_support
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.