You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 1, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Jun 1, 2026. It is now read-only.
outside_tests hit servers with behavior that depends on country of origin #27
Built from the latest revision (78f8554) in the master branch:
Starting test case outside_tests:outside_cnn_dot_com...
../tests/functional/http/client/outside_tests.cpp:56: error: Failure in outside_cnn_dot_com: CHECK_EQUAL(status_codes::OK, response.status_code()) where status_codes::OK=200 and response.status_code()=302
FAILED
../tests/functional/http/client/outside_tests.cpp:61: error: Failure in outside_cnn_dot_com: CHECK_EQUAL(status_codes::OK, response.status_code()) where status_codes::OK=200 and response.status_code()=302
FAILED
Test case outside_tests:outside_cnn_dot_com FAILED
Starting test case outside_tests:outside_google_dot_com...
../tests/functional/http/client/outside_tests.cpp:73: error: Failure in outside_google_dot_com: CHECK_EQUAL(status_codes::OK, response.status_code()) where status_codes::OK=200 and response.status_code()=302
FAILED
../tests/functional/http/client/outside_tests.cpp:73: error: Failure in outside_google_dot_com: CHECK_EQUAL(status_codes::OK, response.status_code()) where status_codes::OK=200 and response.status_code()=302
FAILED
Test case outside_tests:outside_google_dot_com FAILED
Starting test case outside_tests:multiple_https_requests...
../tests/functional/http/client/outside_tests.cpp:87: error: Failure in multiple_https_requests: CHECK_EQUAL(status_codes::OK, response.status_code()) where status_codes::OK=200 and response.status_code()=302
FAILED
../tests/functional/http/client/outside_tests.cpp:87: error: Failure in multiple_https_requests: CHECK_EQUAL(status_codes::OK, response.status_code()) where status_codes::OK=200 and response.status_code()=302
FAILED
../tests/functional/http/client/outside_tests.cpp:87: error: Failure in multiple_https_requests: CHECK_EQUAL(status_codes::OK, response.status_code()) where status_codes::OK=200 and response.status_code()=302
FAILED
../tests/functional/http/client/outside_tests.cpp:87: error: Failure in multiple_https_requests: CHECK_EQUAL(status_codes::OK, response.status_code()) where status_codes::OK=200 and response.status_code()=302
FAILED
../tests/functional/http/client/outside_tests.cpp:87: error: Failure in multiple_https_requests: CHECK_EQUAL(status_codes::OK, response.status_code()) where status_codes::OK=200 and response.status_code()=302
FAILED
Test case outside_tests:multiple_https_requests FAILED
Starting test case outside_tests:reading_google_stream...
../tests/functional/http/client/outside_tests.cpp:107: error: Failure in reading_google_stream: CHECK_EQUAL(strcmp((const char *) chars, "<!doctype html><html itemscope=\"\" itemtype=\"http://schema.org/WebPage\""), 0) where strcmp((const char *) chars, "<!doctype html><html itemscope=\"\" itemtype=\"http://schema.org/WebPage\"")=1 and 0=0
FAILED
Test case outside_tests:reading_google_stream FAILED
I found the following patch in Ubuntu's casablanca package [1]:
Description: Debian forbids calls to http websites.
Tests trying to do web calls are disabled
Currently there are only 4 tests that has been disabled:
outside_cnn_dot_com, outside_google_dot_comm,
reading_google_stream and outside_ssl_json.
Author: Gianfranco Costamagna <costamagnagianfranco@yahoo.it>
Origin: debian
Forwarded: not-needed
Reviewed-By: Gianfranco Costamagna <costamagnagianfranco@yahoo.it>
Last-Update: 2014-09-27
--- casablanca-2.2.0.orig/Release/tests/Functional/http/client/CMakeLists.txt
+++ casablanca-2.2.0/Release/tests/Functional/http/client/CMakeLists.txt
@@ -14,7 +14,6 @@ set(SOURCES
multiple_requests.cpp
oauth1_tests.cpp
oauth2_tests.cpp
- outside_tests.cpp
pipeline_stage_tests.cpp
progress_handler_tests.cpp
proxy_tests.cpp
Hmm, this might be the issue. It looks like https://en.wikipedia.org/wiki/HTTP_302 is Redirect, so are the tests possibly being run under some sort of proxy?
What is your testing environment? Archlinux 64-bit on a desktop computer with internet?
Yes, Arch Linux 64-bit desktop with Internet connection. No, there is no proxy involved. At least, I'm not aware of the one as this is my personal box and I didn't install any proxy here.
Odd. At the very least, I don't think the core library functionality should be diminished.
After running the tests again and ensuring they fail on your current internet connection, could you paste the results of $ curl -I http://www.cnn.com/
here?
Aha, this looks like a US-centrism on our part. Apparently cnn.com redirects users from other countries to the "http://edition.cnn.com/" drop location, which is causing the problem.
This means that 1) you can consider these tests passing ☺ and 2) these tests should probably be changed to hit the international home pages (which at least in the cnn case does not redirect even in the US).
Thanks for reporting this issue; if you'd like to prepare a PR changing the tests please do.
changed the title [-]Four HTTP client tests fail on Arch Linux[/-][+]outside_tests hit servers with behavior that depends on country of origin[/+]on Jan 19, 2016
Activity
Alexander-Shukaev commentedon Dec 1, 2015
I found the following patch in Ubuntu's
casablancapackage [1]:Could it be the same problem on Arch Linux?
ras0219-msft commentedon Dec 2, 2015
Hmm, this might be the issue. It looks like https://en.wikipedia.org/wiki/HTTP_302 is Redirect, so are the tests possibly being run under some sort of proxy?
What is your testing environment? Archlinux 64-bit on a desktop computer with internet?
Alexander-Shukaev commentedon Dec 2, 2015
Yes, Arch Linux 64-bit desktop with Internet connection. No, there is no proxy involved. At least, I'm not aware of the one as this is my personal box and I didn't install any proxy here.
ras0219-msft commentedon Dec 2, 2015
Odd. At the very least, I don't think the core library functionality should be diminished.
After running the tests again and ensuring they fail on your current internet connection, could you paste the results of
$ curl -I http://www.cnn.com/here?
Alexander-Shukaev commentedon Dec 2, 2015
There you go:
ras0219-msft commentedon Dec 3, 2015
Aha, this looks like a US-centrism on our part. Apparently cnn.com redirects users from other countries to the "http://edition.cnn.com/" drop location, which is causing the problem.
This means that 1) you can consider these tests passing ☺ and 2) these tests should probably be changed to hit the international home pages (which at least in the cnn case does not redirect even in the US).
Thanks for reporting this issue; if you'd like to prepare a PR changing the tests please do.
AnyCPU commentedon Dec 22, 2015
On FreeBSD this fails too.
[-]Four HTTP client tests fail on Arch Linux[/-][+]outside_tests hit servers with behavior that depends on country of origin[/+]iamazeem commentedon Sep 20, 2016
I have the same issue on Mac OS X. Here's the list of failed tests:-
Using curl shows the redirections. That means the tests have not been updated so far.
Here are the curl results:-
CNN:
Google:
But, what about the other failures? Any thoughts?
Add patch to disable outside/failing tests
Fix cnn outside test