[Opalvoip-svn] SF.net SVN: opalvoip:[34910] ptlib/trunk/src/ptclib/httpsrvr.cxx
Brought to you by:
csoutheren,
rjongbloed
From: <rjo...@us...> - 2016-08-05 08:52:40
|
Revision: 34910 http://sourceforge.net/p/opalvoip/code/34910 Author: rjongbloed Date: 2016-08-05 08:52:38 +0000 (Fri, 05 Aug 2016) Log Message: ----------- IMproved logs around HTTP server persistent connections. Modified Paths: -------------- ptlib/trunk/src/ptclib/httpsrvr.cxx Modified: ptlib/trunk/src/ptclib/httpsrvr.cxx =================================================================== --- ptlib/trunk/src/ptclib/httpsrvr.cxx 2016-08-03 18:36:06 UTC (rev 34909) +++ ptlib/trunk/src/ptclib/httpsrvr.cxx 2016-08-05 08:52:38 UTC (rev 34910) @@ -289,7 +289,10 @@ // make sure the form info is reset for each new operation connectInfo.ResetMultipartFormInfo(); - PTRACE(5, "Transaction " << connectInfo.GetCommandName() << " \"" << args << "\" url=" << connectInfo.GetURL()); + PTRACE(5, "Transaction: " << connectInfo.GetCommandName() << " \"" << args << "\"," + " url=" << connectInfo.GetURL() << "," + " persist=" << std::boolalpha << connectInfo.IsPersistent() << "," + " proxy=" << connectInfo.IsProxyConnection()); if (connectInfo.IsWebSocket()) { if (!OnWebSocket(connectInfo)) @@ -323,11 +326,13 @@ // we always close the socket so the client will get the correct end of file if (persist && connectInfo.IsPersistent()) { unsigned max = connectInfo.GetPersistenceMaximumTransations(); - if (max == 0 || transactionCount < max) + if (max == 0 || transactionCount < max) { + PTRACE(5, "Connection persisting: transactions=" << transactionCount << ", max=" << max); return true; + } } - PTRACE(5, "Connection end: " << connectInfo.IsPersistent()); + PTRACE(5, "Connection persistence ended: requested=" << std::boolalpha << connectInfo.IsPersistent() << ", persist=" << persist); // close the output stream now and return false Shutdown(ShutdownWrite); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |