Skip to content
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

test case HttpClientTest.GetWithoutProxy failed #104

Open
yeshunping opened this issue Jun 15, 2013 · 3 comments
Open

test case HttpClientTest.GetWithoutProxy failed #104

yeshunping opened this issue Jun 15, 2013 · 3 comments

Comments

@yeshunping
Copy link
Contributor

[ 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
Copy link
Contributor Author

$ 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
    < <title>301 Moved Permanently</title>

    301 Moved Permanently


    nginx/0.8.53
  • Closing connection #0

@yeshunping
Copy link
Contributor Author

qq20130615195837

@yeshunping
Copy link
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant