toft
toft copied to clipboard
test case HttpClientTest.GetWithoutProxy failed
[ RUN ] HttpClientTest.GetWithoutProxy toft/net/http/http_client_test.cpp:64: Failure Value of: client.Get("http://non-exist-domaon.test/world", &response, &error) Actual: true Expected: false toft/net/http/http_client_test.cpp:65: Failure Value of: error Actual: 0 Expected: HttpClient::ERROR_FAIL_TO_RESOLVE_ADDRESS Which is: 4 toft/net/http/http_client_test.cpp:66: Failure Value of: client.GetErrorMessage(error) Actual: "Success" Expected: "Failed to resolve address" [ FAILED ] HttpClientTest.GetWithoutProxy (717 ms)
$ curl --verbose http://non-exist-domaon.test/world
- About to connect() to non-exist-domaon.test port 80 (#0)
- Trying 202.106.199.37... connected
- Connected to non-exist-domaon.test (202.106.199.37) port 80 (#0)
GET /world HTTP/1.1 User-Agent: curl/7.21.6 (x86_64-pc-linux-gnu) libcurl/7.21.6 OpenSSL/1.0.0e zlib/1.2.3.4 libidn/1.22 librtmp/2.3 Host: non-exist-domaon.test Accept: /
301 Moved Permanently 301 Moved Permanently
nginx/0.8.53 - Closing connection #0
看起来像是联通运营商在搞鬼,强制跳转了。