more debug output for test web server
This commit is contained in:
parent
aef04aca5b
commit
4e78921c76
|
@ -1152,7 +1152,7 @@ void web_server_thread(int* port, bool ssl, bool chunked)
|
||||||
sock = s.get<stream_socket>();
|
sock = s.get<stream_socket>();
|
||||||
|
|
||||||
bool accept_done = false;
|
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));
|
acceptor.async_accept(*sock, boost::bind(&on_accept, boost::ref(ec), _1, &accept_done));
|
||||||
while (!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());
|
fprintf(stderr, "%s: accept failed: %s\n", time_now_string(), ec.message().c_str());
|
||||||
return;
|
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())
|
if (!s.is_open())
|
||||||
{
|
{
|
||||||
fprintf(stderr, "%s: incoming connection closed\n", time_now_string());
|
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);
|
TEST_CHECK(error == false);
|
||||||
if (error)
|
if (error)
|
||||||
{
|
{
|
||||||
fprintf(stderr, "parse failed\n");
|
fprintf(stderr, "HTTP parse failed\n");
|
||||||
failed = true;
|
failed = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -1233,13 +1233,13 @@ void web_server_thread(int* port, bool ssl, bool chunked)
|
||||||
ios.reset();
|
ios.reset();
|
||||||
if (stop_thread || ios.run_one(e) == 0)
|
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;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (timed_out)
|
if (timed_out)
|
||||||
{
|
{
|
||||||
fprintf(stderr, "read timed out, closing connection\n");
|
fprintf(stderr, "HTTP read timed out, closing connection\n");
|
||||||
failed = true;
|
failed = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -1247,7 +1247,7 @@ void web_server_thread(int* port, bool ssl, bool chunked)
|
||||||
|
|
||||||
if (ec || received <= 0)
|
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));
|
, ec.message().c_str(), ec.category().name(), int(received));
|
||||||
failed = true;
|
failed = true;
|
||||||
break;
|
break;
|
||||||
|
@ -1255,7 +1255,7 @@ void web_server_thread(int* port, bool ssl, bool chunked)
|
||||||
|
|
||||||
timer.cancel(ec);
|
timer.cancel(ec);
|
||||||
if (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;
|
len += received;
|
||||||
|
|
||||||
|
@ -1264,7 +1264,7 @@ void web_server_thread(int* port, bool ssl, bool chunked)
|
||||||
TEST_CHECK(error == false);
|
TEST_CHECK(error == false);
|
||||||
if (error)
|
if (error)
|
||||||
{
|
{
|
||||||
fprintf(stderr, "parse failed\n");
|
fprintf(stderr, "HTTP parse failed\n");
|
||||||
failed = true;
|
failed = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue