aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/Servers/MainServer.cs51
1 files changed, 51 insertions, 0 deletions
diff --git a/OpenSim/Framework/Servers/MainServer.cs b/OpenSim/Framework/Servers/MainServer.cs
index 1ac0953..b367b12 100644
--- a/OpenSim/Framework/Servers/MainServer.cs
+++ b/OpenSim/Framework/Servers/MainServer.cs
@@ -29,6 +29,7 @@ using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Reflection; 30using System.Reflection;
31using System.Net; 31using System.Net;
32using System.Text;
32using log4net; 33using log4net;
33using OpenSim.Framework; 34using OpenSim.Framework;
34using OpenSim.Framework.Console; 35using OpenSim.Framework.Console;
@@ -105,6 +106,11 @@ namespace OpenSim.Framework.Servers
105 public static void RegisterHttpConsoleCommands(ICommandConsole console) 106 public static void RegisterHttpConsoleCommands(ICommandConsole console)
106 { 107 {
107 console.Commands.AddCommand( 108 console.Commands.AddCommand(
109 "Comms", false, "show http-handlers",
110 "show http-handlers",
111 "Show all registered http handlers", HandleShowHttpHandlersCommand);
112
113 console.Commands.AddCommand(
108 "Debug", false, "debug http", "debug http [<level>]", 114 "Debug", false, "debug http", "debug http [<level>]",
109 "Turn on inbound non-poll http request debugging.", 115 "Turn on inbound non-poll http request debugging.",
110 "If level <= 0, then no extra logging is done.\n" 116 "If level <= 0, then no extra logging is done.\n"
@@ -142,6 +148,51 @@ namespace OpenSim.Framework.Servers
142 } 148 }
143 } 149 }
144 150
151 private static void HandleShowHttpHandlersCommand(string module, string[] args)
152 {
153 if (args.Length != 2)
154 {
155 MainConsole.Instance.Output("Usage: show http-handlers");
156 return;
157 }
158
159 StringBuilder handlers = new StringBuilder();
160
161 lock (m_Servers)
162 {
163 foreach (BaseHttpServer httpServer in m_Servers.Values)
164 {
165 handlers.AppendFormat(
166 "Registered HTTP Handlers for server at {0}:{1}\n", httpServer.ListenIPAddress, httpServer.Port);
167
168 handlers.AppendFormat("* XMLRPC:\n");
169 foreach (String s in httpServer.GetXmlRpcHandlerKeys())
170 handlers.AppendFormat("\t{0}\n", s);
171
172 handlers.AppendFormat("* HTTP:\n");
173 List<String> poll = httpServer.GetPollServiceHandlerKeys();
174 foreach (String s in httpServer.GetHTTPHandlerKeys())
175 handlers.AppendFormat("\t{0} {1}\n", s, (poll.Contains(s) ? "(poll service)" : string.Empty));
176
177 handlers.AppendFormat("* Agent:\n");
178 foreach (String s in httpServer.GetAgentHandlerKeys())
179 handlers.AppendFormat("\t{0}\n", s);
180
181 handlers.AppendFormat("* LLSD:\n");
182 foreach (String s in httpServer.GetLLSDHandlerKeys())
183 handlers.AppendFormat("\t{0}\n", s);
184
185 handlers.AppendFormat("* StreamHandlers ({0}):\n", httpServer.GetStreamHandlerKeys().Count);
186 foreach (String s in httpServer.GetStreamHandlerKeys())
187 handlers.AppendFormat("\t{0}\n", s);
188
189 handlers.Append("\n");
190 }
191 }
192
193 MainConsole.Instance.Output(handlers.ToString());
194 }
195
145 /// <summary> 196 /// <summary>
146 /// Register an already started HTTP server to the collection of known servers. 197 /// Register an already started HTTP server to the collection of known servers.
147 /// </summary> 198 /// </summary>