aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Application
diff options
context:
space:
mode:
authorCharles Krinke2009-04-17 21:48:48 +0000
committerCharles Krinke2009-04-17 21:48:48 +0000
commitb4cb45bb79619306b25c67c770165ab752aeb742 (patch)
tree3d1a7d763a3cc3647aff6a07462971c9f12b2d5c /OpenSim/Region/Application
parent* Add Implementation of Linear Motor and Linear friction from the LSL Vehicle... (diff)
downloadopensim-SC_OLD-b4cb45bb79619306b25c67c770165ab752aeb742.zip
opensim-SC_OLD-b4cb45bb79619306b25c67c770165ab752aeb742.tar.gz
opensim-SC_OLD-b4cb45bb79619306b25c67c770165ab752aeb742.tar.bz2
opensim-SC_OLD-b4cb45bb79619306b25c67c770165ab752aeb742.tar.xz
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.
Diffstat (limited to 'OpenSim/Region/Application')
-rw-r--r--OpenSim/Region/Application/OpenSimBase.cs37
1 files changed, 37 insertions, 0 deletions
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs
index 7aa9f99..18abcad 100644
--- a/OpenSim/Region/Application/OpenSimBase.cs
+++ b/OpenSim/Region/Application/OpenSimBase.cs
@@ -807,6 +807,43 @@ namespace OpenSim
807 } 807 }
808 } 808 }
809 809
810 /// <summary>
811 /// Handler to supply the current extended status of this sim
812 /// </summary>
813 /// Currently prints the same a "show stats" plus the uptime of the sim
814 public class XSimStatusHandler : IStreamedRequestHandler
815 {
816 OpenSimBase m_opensim;
817
818 public XSimStatusHandler(OpenSimBase sim)
819 // public XSimStatusHandler(BaseOpenSimServer sim)
820 {
821 m_opensim = sim;
822 }
823
824 public byte[] Handle(string path, Stream request,
825 OSHttpRequest httpRequest, OSHttpResponse httpResponse)
826 {
827 return Encoding.UTF8.GetBytes(m_opensim.StatReport());
828 }
829
830 public string ContentType
831 {
832 get { return "text/plain"; }
833 }
834
835 public string HttpMethod
836 {
837 get { return "GET"; }
838 }
839
840 public string Path
841 {
842 get { return "/simstatusx/"; }
843 }
844 }
845
846
810 #endregion 847 #endregion
811 848
812 /// <summary> 849 /// <summary>