From ecb87b003b5a5d8a05b8632f9786702471aeb184 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Fri, 22 Nov 2013 03:05:38 +0000 Subject: [PATCH] attempt to fix http_connection unit test --- test/test_http_connection.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/test_http_connection.cpp b/test/test_http_connection.cpp index 9ab21997c..898ec94d5 100644 --- a/test/test_http_connection.cpp +++ b/test/test_http_connection.cpp @@ -159,7 +159,10 @@ void run_suite(std::string const& protocol, proxy_settings ps, int port) run_test(url_base + "relative/redirect", 3216, 200, 2, error_code(), ps); run_test(url_base + "redirect", 3216, 200, 2, error_code(), ps); - run_test(url_base + "infinite_redirect", 0, 301, 6, error_code(asio::error::eof), ps); + // the actual error code for an abort caused by too many + // redirects is a bit unpredictable. under SSL for instance, + // it will be an ungraceful shutdown + run_test(url_base + "infinite_redirect", 0, 301, 6, err(), ps); run_test(url_base + "test_file", 3216, 200, 1, error_code(), ps); run_test(url_base + "test_file.gz", 3216, 200, 1, error_code(), ps); run_test(url_base + "non-existing-file", -1, 404, 1, err(), ps);