Fix nullptr deref

This commit is contained in:
Jean Flach 2018-01-30 13:34:26 +01:00
parent f5f8b90ec8
commit e1c46cedd1
1 changed files with 5 additions and 2 deletions

View File

@ -165,9 +165,12 @@ void HttpServerConnection::ProcessMessageAsync(HttpRequest& request)
String requestUrl = request.RequestUrl->Format();
Socket::Ptr socket = m_Stream->GetSocket();
Log(LogInformation, "HttpServerConnection")
<< "Request: " << request.RequestMethod << " " << requestUrl
<< " (from " << m_Stream->GetSocket()->GetPeerAddress() << ", user: " << (user ? user->GetName() : "<unauthenticated>") << ")";
<< " (from " << (socket ? socket->GetPeerAddress() : "<unkown>")
<< ", user: " << (user ? user->GetName() : "<unauthenticated>") << ")";
HttpResponse response(m_Stream, request);