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

@@ -39,16 +39,15 @@ public:
HTTP::Server m_server;
std::unique_ptr <RippleSSLContext> m_context;
RPCHTTPServerImp (Stoppable& parent,
beast::Journal journal, JobQueue& jobQueue, NetworkOPs& networkOPs,
Resource::Manager& resourceManager)
RPCHTTPServerImp (Stoppable& parent, JobQueue& jobQueue,
NetworkOPs& networkOPs, Resource::Manager& resourceManager)
: RPCHTTPServer (parent)
, m_resourceManager (resourceManager)
, m_journal (journal)
, m_journal (deprecatedLogs().journal("HTTP-RPC"))
, m_jobQueue (jobQueue)
, m_networkOPs (networkOPs)
, m_deprecatedHandler (networkOPs, resourceManager)
, m_server (*this, journal)
, m_server (*this, deprecatedLogs().journal("HTTP"))
{
if (getConfig ().RPC_SECURE == 0)
{
@@ -307,19 +306,18 @@ public:
RPCHTTPServer::RPCHTTPServer (Stoppable& parent)
: Stoppable ("RPCHTTPServer", parent)
, Source ("rpc")
, Source ("http")
{
}
//------------------------------------------------------------------------------
std::unique_ptr <RPCHTTPServer>
make_RPCHTTPServer (beast::Stoppable& parent, beast::Journal journal,
JobQueue& jobQueue, NetworkOPs& networkOPs,
Resource::Manager& resourceManager)
make_RPCHTTPServer (beast::Stoppable& parent, JobQueue& jobQueue,
NetworkOPs& networkOPs, Resource::Manager& resourceManager)
{
return std::make_unique <RPCHTTPServerImp> (
parent, journal, jobQueue, networkOPs, resourceManager);
parent, jobQueue, networkOPs, resourceManager);
}
}