Fixes Mantis # 3469. Thank you kindly, BlueWall, for a patch that:

This patch adds extended status reporting with the url 
http://server:port/simstatusx/ [^] . The data is returned 
in json format as "text/plain" type.
This commit is contained in:
Charles Krinke
2009-04-17 21:48:48 +00:00
parent 07c113a766
commit b4cb45bb79
8 changed files with 128 additions and 1 deletions

View File

@@ -807,6 +807,43 @@ namespace OpenSim
}
}
/// <summary>
/// Handler to supply the current extended status of this sim
/// </summary>
/// Currently prints the same a "show stats" plus the uptime of the sim
public class XSimStatusHandler : IStreamedRequestHandler
{
OpenSimBase m_opensim;
public XSimStatusHandler(OpenSimBase sim)
// public XSimStatusHandler(BaseOpenSimServer sim)
{
m_opensim = sim;
}
public byte[] Handle(string path, Stream request,
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
{
return Encoding.UTF8.GetBytes(m_opensim.StatReport());
}
public string ContentType
{
get { return "text/plain"; }
}
public string HttpMethod
{
get { return "GET"; }
}
public string Path
{
get { return "/simstatusx/"; }
}
}
#endregion
/// <summary>