Add log warning if xmlrpc request deserialization fails
parent
9aee2bc8e7
commit
754bfeeb04
|
@ -40,7 +40,7 @@ using HttpServer;
|
||||||
using log4net;
|
using log4net;
|
||||||
using Nwc.XmlRpc;
|
using Nwc.XmlRpc;
|
||||||
using OpenMetaverse.StructuredData;
|
using OpenMetaverse.StructuredData;
|
||||||
using CoolHTTPListener = HttpServer.HttpListener;
|
using CoolHTTPListener = HttpServer.HttpListener;
|
||||||
using CoolHttpServer = HttpServer;
|
using CoolHttpServer = HttpServer;
|
||||||
using HttpListener=System.Net.HttpListener;
|
using HttpListener=System.Net.HttpListener;
|
||||||
|
|
||||||
|
@ -700,10 +700,13 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
xmlRprcRequest = (XmlRpcRequest) (new XmlRpcRequestDeserializer()).Deserialize(requestBody);
|
xmlRprcRequest = (XmlRpcRequest)(new XmlRpcRequestDeserializer()).Deserialize(requestBody);
|
||||||
}
|
}
|
||||||
catch (XmlException)
|
catch (XmlException e)
|
||||||
{
|
{
|
||||||
|
m_log.WarnFormat(
|
||||||
|
"[BASE HTTP SERVER]: Ignoring XMLRPC request from {0} due to deserialization exception {1} {2}",
|
||||||
|
request.RemoteIPEndPoint, e.Message, e.StackTrace);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (xmlRprcRequest != null)
|
if (xmlRprcRequest != null)
|
||||||
|
@ -1825,19 +1828,19 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||||
public void Write(object source, LogPrio priority, string message)
|
public void Write(object source, LogPrio priority, string message)
|
||||||
{
|
{
|
||||||
switch (priority)
|
switch (priority)
|
||||||
{
|
{
|
||||||
case CoolHttpServer.LogPrio.Debug:
|
case CoolHttpServer.LogPrio.Debug:
|
||||||
m_log.DebugFormat("[{0}]: {1}", source.ToString(), message);
|
m_log.DebugFormat("[{0}]: {1}", source.ToString(), message);
|
||||||
break;
|
break;
|
||||||
case CoolHttpServer.LogPrio.Error:
|
case CoolHttpServer.LogPrio.Error:
|
||||||
m_log.ErrorFormat("[{0}]: {1}", source.ToString(), message);
|
m_log.ErrorFormat("[{0}]: {1}", source.ToString(), message);
|
||||||
break;
|
break;
|
||||||
case CoolHttpServer.LogPrio.Info:
|
case CoolHttpServer.LogPrio.Info:
|
||||||
m_log.InfoFormat("[{0}]: {1}", source.ToString(), message);
|
m_log.InfoFormat("[{0}]: {1}", source.ToString(), message);
|
||||||
break;
|
break;
|
||||||
case CoolHttpServer.LogPrio.Warning:
|
case CoolHttpServer.LogPrio.Warning:
|
||||||
m_log.WarnFormat("[{0}]: {1}", source.ToString(), message);
|
m_log.WarnFormat("[{0}]: {1}", source.ToString(), message);
|
||||||
break;
|
break;
|
||||||
case CoolHttpServer.LogPrio.Fatal:
|
case CoolHttpServer.LogPrio.Fatal:
|
||||||
m_log.ErrorFormat("[{0}]: FATAL! - {1}", source.ToString(), message);
|
m_log.ErrorFormat("[{0}]: FATAL! - {1}", source.ToString(), message);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue