toft icon indicating copy to clipboard operation
toft copied to clipboard

test case HttpClientTest.GetWithoutProxy failed

Open yeshunping opened this issue 11 years ago • 3 comments

[ 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)

yeshunping avatar Jun 15 '13 11:06 yeshunping

$ 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: /

    < HTTP/1.1 301 Moved Permanently < Server: nginx/0.8.53 < Date: Sat, 15 Jun 2013 11:56:01 GMT < Content-Type: text/html < Content-Length: 185 < Connection: close < Location: http://59.151.106.150 < 301 Moved Permanently

    301 Moved Permanently


    nginx/0.8.53
  • Closing connection #0

yeshunping avatar Jun 15 '13 11:06 yeshunping

qq20130615195837

yeshunping avatar Jun 15 '13 11:06 yeshunping

看起来像是联通运营商在搞鬼,强制跳转了。

yeshunping avatar Jun 15 '13 12:06 yeshunping