mirror of
https://github.com/opensim/opensim.git
synced 2026-08-10 11:33:28 +08:00
Merge branch 'master' into careminster
This commit is contained in:
@@ -724,12 +724,20 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
string errorMessage
|
||||
= String.Format(
|
||||
"Requested method [{0}] from {1} threw exception: {2} {3}",
|
||||
methodName, request.RemoteIPEndPoint.Address, e.Message, e.StackTrace);
|
||||
|
||||
m_log.ErrorFormat("[BASE HTTP SERVER]: {0}", errorMessage);
|
||||
|
||||
// if the registered XmlRpc method threw an exception, we pass a fault-code along
|
||||
xmlRpcResponse = new XmlRpcResponse();
|
||||
|
||||
// Code probably set in accordance with http://xmlrpc-epi.sourceforge.net/specs/rfc.fault_codes.php
|
||||
xmlRpcResponse.SetFault(-32603, String.Format("Requested method [{0}] threw exception: {1}",
|
||||
methodName, e.Message));
|
||||
xmlRpcResponse.SetFault(-32603, errorMessage);
|
||||
}
|
||||
|
||||
// if the method wasn't found, we can't determine KeepAlive state anyway, so lets do it only here
|
||||
response.KeepAlive = m_rpcHandlersKeepAlive[methodName];
|
||||
}
|
||||
|
||||
@@ -188,7 +188,15 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||
try
|
||||
{
|
||||
IPAddress addr = IPAddress.Parse(req.Headers["remote_addr"]);
|
||||
int port = Int32.Parse(req.Headers["remote_port"]);
|
||||
// sometimes req.Headers["remote_port"] returns a comma separated list, so use
|
||||
// the first one in the list and log it
|
||||
string[] strPorts = req.Headers["remote_port"].Split(new char[] { ',' });
|
||||
if (strPorts.Length > 1)
|
||||
{
|
||||
_log.ErrorFormat("[OSHttpRequest]: format exception on addr/port {0}:{1}, ignoring",
|
||||
req.Headers["remote_addr"], req.Headers["remote_port"]);
|
||||
}
|
||||
int port = Int32.Parse(strPorts[0]);
|
||||
_remoteIPEndPoint = new IPEndPoint(addr, port);
|
||||
}
|
||||
catch (FormatException)
|
||||
|
||||
Reference in New Issue
Block a user