Golang - 为什么`http.Get`的行为在Windows和Linux之间有所不同?

时间:2017-05-24 05:32:37

标签: go

我正在尝试通过http.Get致电http://example.com/path/to/index,我已将example.com解析为我的一个内部IP地址。

我的Go代码:

resp, err := http.Get("http://example.com/path/to/index")

在Windows上,这将永久阻止,直到连接超时。 但是,在Linux上,它完全正常。

持有者是什么,我已经尝试过两个curl http://example.com/path/to/index并将Go代码翻译成Nodejs,它们在Windows上工作正常,这使我确保在我的Windows上域解析是正常的。

所以我想知道为什么http.Get的行为在Windows和Linux上有所不同。

0 个答案:

没有答案
相关问题