From f177d8786d98b2752d4c9ba3ecf7204245176e38 Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Fri, 5 Apr 2019 15:08:09 +0200 Subject: [PATCH] HttpServerConnection: Log the user agent field for new requests too refs #7041 --- lib/remote/httpserverconnection.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/remote/httpserverconnection.cpp b/lib/remote/httpserverconnection.cpp index c06e381e2..53aefc497 100644 --- a/lib/remote/httpserverconnection.cpp +++ b/lib/remote/httpserverconnection.cpp @@ -489,7 +489,9 @@ void HttpServerConnection::ProcessMessages(boost::asio::yield_context yc) Log(LogInformation, "HttpServerConnection") << "Request: " << request.method_string() << ' ' << request.target() << " (from " << m_PeerAddress - << "), user: " << (authenticatedUser ? authenticatedUser->GetName() : "") << ')'; + << "), user: " << (authenticatedUser ? authenticatedUser->GetName() : "") + << ", agent: " << request[http::field::user_agent] << ")."; //operator[] - Returns the value for a field, or "" if it does not exist. + if (!HandleAccessControl(*m_Stream, request, response, yc)) { break;