Fix handling of HTTP/S keep-alives (RIPD-556):

* Proper shutdown for ssl and non-ssl connections
* Report session id in history
* Report histogram of requests per session
* Change print name to 'http'
* Split logging into "HTTP" and "HTTP-RPC" partitions
* More logging and refinement of logging severities
* Log the request count when a session is destroyed

Conflicts:
	src/ripple/http/impl/Peer.cpp
	src/ripple/http/impl/Peer.h
	src/ripple/http/impl/ServerImpl.cpp
	src/ripple/module/app/main/Application.cpp
	src/ripple/module/app/main/RPCHTTPServer.cpp
This commit is contained in:
Vinnie Falco
2014-09-08 14:04:16 -07:00
parent 319ac14e7d
commit ee8bd8ddae
12 changed files with 529 additions and 236 deletions

View File

@@ -81,7 +81,7 @@ void
Door::async_accept ()
{
auto const peer (std::make_shared <Peer> (server_, port_, server_.journal()));
acceptor_.async_accept (peer->get_socket(), std::bind (
acceptor_.async_accept (peer->get_socket(), endpoint_, std::bind (
&Door::handle_accept, Ptr(this),
beast::asio::placeholders::error, peer));
}
@@ -95,13 +95,14 @@ Door::handle_accept (error_code ec,
if (ec)
{
server_.journal().error << "Accept failed: " << ec.message();
server_.journal().error <<
"accept: " << ec.message();
return;
}
auto const endpoint = endpoint_;
async_accept();
peer->accept();
peer->accept (endpoint);
}
}