From 4e78921c76308f8966e04a5dfe4345cac87ce001 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Mon, 28 Oct 2013 07:56:10 +0000 Subject: [PATCH] more debug output for test web server --- test/setup_transfer.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/test/setup_transfer.cpp b/test/setup_transfer.cpp index 4f5df360e..35e031e24 100644 --- a/test/setup_transfer.cpp +++ b/test/setup_transfer.cpp @@ -1152,7 +1152,7 @@ void web_server_thread(int* port, bool ssl, bool chunked) sock = s.get(); bool accept_done = false; - DLOG(stderr, "waiting for incoming connection\n"); + fprintf(stderr, "HTTP waiting for incoming connection\n"); acceptor.async_accept(*sock, boost::bind(&on_accept, boost::ref(ec), _1, &accept_done)); while (!accept_done) { @@ -1171,7 +1171,7 @@ void web_server_thread(int* port, bool ssl, bool chunked) fprintf(stderr, "%s: accept failed: %s\n", time_now_string(), ec.message().c_str()); return; } - DLOG(stderr, "%s: accepting incoming connection\n", time_now_string()); + fprintf(stderr, "%s: accepting incoming connection\n", time_now_string()); if (!s.is_open()) { fprintf(stderr, "%s: incoming connection closed\n", time_now_string()); @@ -1209,7 +1209,7 @@ void web_server_thread(int* port, bool ssl, bool chunked) TEST_CHECK(error == false); if (error) { - fprintf(stderr, "parse failed\n"); + fprintf(stderr, "HTTP parse failed\n"); failed = true; break; } @@ -1233,13 +1233,13 @@ void web_server_thread(int* port, bool ssl, bool chunked) ios.reset(); if (stop_thread || ios.run_one(e) == 0) { - fprintf(stderr, "io_service stopped: %s\n", e.message().c_str()); + fprintf(stderr, "HTTP io_service stopped: %s\n", e.message().c_str()); break; } } if (timed_out) { - fprintf(stderr, "read timed out, closing connection\n"); + fprintf(stderr, "HTTP read timed out, closing connection\n"); failed = true; break; } @@ -1247,7 +1247,7 @@ void web_server_thread(int* port, bool ssl, bool chunked) if (ec || received <= 0) { - fprintf(stderr, "read failed: \"%s\" (%s) received: %d\n" + fprintf(stderr, "HTTP read failed: \"%s\" (%s) received: %d\n" , ec.message().c_str(), ec.category().name(), int(received)); failed = true; break; @@ -1255,7 +1255,7 @@ void web_server_thread(int* port, bool ssl, bool chunked) timer.cancel(ec); if (ec) - fprintf(stderr, "timer.cancel failed: %s\n", ec.message().c_str()); + fprintf(stderr, "HTTP timer.cancel failed: %s\n", ec.message().c_str()); len += received; @@ -1264,7 +1264,7 @@ void web_server_thread(int* port, bool ssl, bool chunked) TEST_CHECK(error == false); if (error) { - fprintf(stderr, "parse failed\n"); + fprintf(stderr, "HTTP parse failed\n"); failed = true; break; }