From b6b0bc7b32ec5009eb482d51d0e9ff711e6ec022 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Tue, 29 Nov 2011 16:15:52 +0000 Subject: [PATCH 1/8] Add "debug http" command for currently simple extra debug logging of non-event queue inbound http requests to a simulator --- .../Servers/HttpServer/BaseHttpServer.cs | 55 +++++++++++++++---- OpenSim/Region/Application/OpenSim.cs | 26 ++++++++- 2 files changed, 67 insertions(+), 14 deletions(-) diff --git a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs index 3aed9a8a3b..689a292a6e 100644 --- a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs +++ b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs @@ -79,6 +79,11 @@ namespace OpenSim.Framework.Servers.HttpServer private PollServiceRequestManager m_PollServiceManager; + /// + /// Control the printing of certain debug messages. + /// + public int DebugLevel { get; set; } + public uint SSLPort { get { return m_sslport; } @@ -442,17 +447,20 @@ namespace OpenSim.Framework.Servers.HttpServer string path = request.RawUrl; string handlerKey = GetHandlerKey(request.HttpMethod, path); -// m_log.DebugFormat("[BASE HTTP SERVER]: Handling {0} request for {1}", request.HttpMethod, path); + if (DebugLevel >= 1) + m_log.DebugFormat("[BASE HTTP SERVER]: Handling {0} request for {1}", request.HttpMethod, path); if (TryGetStreamHandler(handlerKey, out requestHandler)) { - //m_log.Debug("[BASE HTTP SERVER]: Found Stream Handler"); + if (DebugLevel >= 2) + m_log.DebugFormat( + "[BASE HTTP SERVER]: Found stream handler {0} for request to {1}", handlerKey, path); + // Okay, so this is bad, but should be considered temporary until everything is IStreamHandler. byte[] buffer = null; response.ContentType = requestHandler.ContentType; // Lets do this defaulting before in case handler has varying content type. - if (requestHandler is IStreamedRequestHandler) { IStreamedRequestHandler streamedRequestHandler = requestHandler as IStreamedRequestHandler; @@ -556,6 +564,7 @@ namespace OpenSim.Framework.Servers.HttpServer { m_log.Warn("[BASE HTTP SERVER]: XmlRpcRequest issue: " + e.Message); } + return; } @@ -566,7 +575,11 @@ namespace OpenSim.Framework.Servers.HttpServer if (strAccept.Contains("application/llsd+xml") || strAccept.Contains("application/llsd+json")) { - //m_log.Info("[Debug BASE HTTP SERVER]: Found an application/llsd+xml accept header"); + if (DebugLevel >= 2) + m_log.DebugFormat( + "[BASE HTTP SERVER]: Found an application/llsd+xml accept header for request to {0}", + path); + HandleLLSDRequests(request, response); return; } @@ -577,15 +590,24 @@ namespace OpenSim.Framework.Servers.HttpServer { case null: case "text/html": -// m_log.DebugFormat( -// "[BASE HTTP SERVER]: Found a text/html content type for request {0}", request.RawUrl); + + if (DebugLevel >= 2) + m_log.DebugFormat( + "[BASE HTTP SERVER]: Found a {0} content type for request to {1}", + request.ContentType, path); + HandleHTTPRequest(request, response); return; case "application/llsd+xml": case "application/xml+llsd": case "application/llsd+json": - //m_log.Info("[Debug BASE HTTP SERVER]: found a application/llsd+xml content type"); + + if (DebugLevel >= 2) + m_log.DebugFormat( + "[BASE HTTP SERVER]: Found a {0} content type for request to {1}", + request.ContentType, path); + HandleLLSDRequests(request, response); return; @@ -602,7 +624,10 @@ namespace OpenSim.Framework.Servers.HttpServer //m_log.Info("[Debug BASE HTTP SERVER]: Checking for LLSD Handler"); if (DoWeHaveALLSDHandler(request.RawUrl)) { - //m_log.Info("[Debug BASE HTTP SERVER]: Found LLSD Handler"); + if (DebugLevel >= 2) + m_log.DebugFormat( + "[BASE HTTP SERVER]: Found an LLSD handler for request to {0}", path); + HandleLLSDRequests(request, response); return; } @@ -610,12 +635,18 @@ namespace OpenSim.Framework.Servers.HttpServer // m_log.DebugFormat("[BASE HTTP SERVER]: Checking for HTTP Handler for request {0}", request.RawUrl); if (DoWeHaveAHTTPHandler(request.RawUrl)) { -// m_log.DebugFormat("[BASE HTTP SERVER]: Found HTTP Handler for request {0}", request.RawUrl); + if (DebugLevel >= 2) + m_log.DebugFormat( + "[BASE HTTP SERVER]: Found an HTTP handler for request to {0}", path); + HandleHTTPRequest(request, response); return; } - //m_log.Info("[Debug BASE HTTP SERVER]: Generic XMLRPC"); + if (DebugLevel >= 2) + m_log.DebugFormat( + "[BASE HTTP SERVER]: Treating request to {0} as a generic XMLRPC request", path); + // generic login request. HandleXmlRpcRequests(request, response); @@ -978,7 +1009,6 @@ namespace OpenSim.Framework.Servers.HttpServer if (llsdRequest != null)// && m_defaultLlsdHandler != null) { - LLSDMethod llsdhandler = null; if (TryGetLLSDHandler(request.RawUrl, out llsdhandler) && !LegacyLLSDLoginLibOMV) @@ -1002,13 +1032,14 @@ namespace OpenSim.Framework.Servers.HttpServer llsdResponse = GenerateNoLLSDHandlerResponse(); } } - } else { llsdResponse = GenerateNoLLSDHandlerResponse(); } + byte[] buffer = new byte[0]; + if (llsdResponse.ToString() == "shutdown404!") { response.ContentType = "text/plain"; diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index ee26e4f585..f4ed32e6be 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs @@ -242,6 +242,14 @@ namespace OpenSim + "If an avatar name is given then only packets from that avatar are logged", Debug); + m_console.Commands.AddCommand("region", false, "debug http", + "debug http ", + "Turn on inbound http request debugging for everything except the event queue (see debug eq)." + + "If level >= 2 then the handler used to service the request is logged.\n" + + "If level >= 1 then incoming HTTP requests are logged.\n" + + "If level <= 0 then no extra http logging is done.\n", + Debug); + m_console.Commands.AddCommand("region", false, "debug scene", "debug scene ", "Turn on scene debugging", Debug); @@ -889,12 +897,26 @@ namespace OpenSim } else { - MainConsole.Instance.Output("packet debug should be 0..255"); + MainConsole.Instance.Output("Usage: debug packet 0..255"); } } break; + case "http": + if (args.Length == 3) + { + int newDebug; + if (int.TryParse(args[2], out newDebug)) + { + MainServer.Instance.DebugLevel = newDebug; + break; + } + } + + MainConsole.Instance.Output("Usage: debug http 0..2"); + break; + case "scene": if (args.Length == 5) { @@ -917,7 +939,7 @@ namespace OpenSim } else { - MainConsole.Instance.Output("debug scene (where inside <> is true/false)"); + MainConsole.Instance.Output("Usage: debug scene (where inside <> is true/false)"); } break; From ff0d020007d1747dbaaca077fd3a930f2ecd1767 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Tue, 29 Nov 2011 16:18:14 +0000 Subject: [PATCH 2/8] Correct mistake in "debug eq" help --- .../ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs index 5c721d41e9..0b76647f4d 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs @@ -111,7 +111,7 @@ namespace OpenSim.Region.ClientStack.Linden "debug eq", "debug eq [0|1]", "debug eq 1 will turn on event queue debugging. This will log all outgoing event queue messages to clients.\n" - + "debug eq 1 will turn off event queue debugging.", + + "debug eq 0 will turn off event queue debugging.", HandleDebugEq); } else From d3a46b03bf8761f5917b324392aa60b10cd9e078 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Tue, 29 Nov 2011 16:29:11 +0000 Subject: [PATCH 3/8] tabulate "show caps" output for easier readability --- .../Framework/Caps/CapabilitiesModule.cs | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/OpenSim/Region/CoreModules/Framework/Caps/CapabilitiesModule.cs b/OpenSim/Region/CoreModules/Framework/Caps/CapabilitiesModule.cs index afbd90205b..780411f8f4 100644 --- a/OpenSim/Region/CoreModules/Framework/Caps/CapabilitiesModule.cs +++ b/OpenSim/Region/CoreModules/Framework/Caps/CapabilitiesModule.cs @@ -29,6 +29,7 @@ using System; using System.Collections; using System.Collections.Generic; using System.Reflection; +using System.Text; using log4net; using Nini.Config; using Mono.Addins; @@ -46,6 +47,8 @@ namespace OpenSim.Region.CoreModules.Framework public class CapabilitiesModule : INonSharedRegionModule, ICapabilitiesModule { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + + private string m_showCapsCommandFormat = " {0,-38} {1,-60}\n"; protected Scene m_scene; @@ -68,7 +71,7 @@ namespace OpenSim.Region.CoreModules.Framework m_scene.RegisterModuleInterface(this); MainConsole.Instance.Commands.AddCommand("Capabilities", false, "show caps", "show caps", - "Shows all registered capabilities", CapabilitiesCommand); + "Shows all registered capabilities", HandleShowCapsCommand); } public void RegionLoaded(Scene scene) @@ -227,21 +230,23 @@ namespace OpenSim.Region.CoreModules.Framework } } - private void CapabilitiesCommand(string module, string[] cmdparams) + private void HandleShowCapsCommand(string module, string[] cmdparams) { - System.Text.StringBuilder caps = new System.Text.StringBuilder(); + StringBuilder caps = new StringBuilder(); caps.AppendFormat("Region {0}:\n", m_scene.RegionInfo.RegionName); foreach (KeyValuePair kvp in m_capsObjects) { caps.AppendFormat("** User {0}:\n", kvp.Key); + for (IDictionaryEnumerator kvp2 = kvp.Value.CapsHandlers.CapsDetails.GetEnumerator(); kvp2.MoveNext(); ) { Uri uri = new Uri(kvp2.Value.ToString()); - caps.AppendFormat(" {0} = {1}\n", kvp2.Key, uri.PathAndQuery); + caps.AppendFormat(m_showCapsCommandFormat, kvp2.Key, uri.PathAndQuery); } + foreach (KeyValuePair kvp3 in kvp.Value.ExternalCapsHandlers) - caps.AppendFormat(" {0} = {1}\n", kvp3.Key, kvp3.Value); + caps.AppendFormat(m_showCapsCommandFormat, kvp3.Key, kvp3.Value); } MainConsole.Instance.Output(caps.ToString()); From a17f93ff44baf41d7ceb3a11a61997fef2c5768b Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Tue, 29 Nov 2011 16:31:10 +0000 Subject: [PATCH 4/8] minor: remove mono compile warning, a Vector3 can never be null since it's a struct --- OpenSim/Region/Physics/Meshing/Meshmerizer.cs | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs index 53d5e4c33f..f15e81ba8e 100644 --- a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs +++ b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs @@ -171,16 +171,13 @@ namespace OpenSim.Region.Physics.Meshing foreach (Vector3 v in meshIn.getVertexList()) { - if (v != null) - { - if (v.X < minX) minX = v.X; - if (v.Y < minY) minY = v.Y; - if (v.Z < minZ) minZ = v.Z; + if (v.X < minX) minX = v.X; + if (v.Y < minY) minY = v.Y; + if (v.Z < minZ) minZ = v.Z; - if (v.X > maxX) maxX = v.X; - if (v.Y > maxY) maxY = v.Y; - if (v.Z > maxZ) maxZ = v.Z; - } + if (v.X > maxX) maxX = v.X; + if (v.Y > maxY) maxY = v.Y; + if (v.Z > maxZ) maxZ = v.Z; } return CreateSimpleBoxMesh(minX, maxX, minY, maxY, minZ, maxZ); From 658d02b5e913bfa21b496515943f90ab25b6dac5 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Tue, 29 Nov 2011 16:56:31 +0000 Subject: [PATCH 5/8] Improve some of the debug help messages --- OpenSim/Region/Application/OpenSim.cs | 6 +++--- .../Linden/Caps/EventQueue/EventQueueGetModule.cs | 1 + .../CoreModules/World/Permissions/PermissionsModule.cs | 5 ++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index f4ed32e6be..d97583cc87 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs @@ -244,8 +244,8 @@ namespace OpenSim m_console.Commands.AddCommand("region", false, "debug http", "debug http ", - "Turn on inbound http request debugging for everything except the event queue (see debug eq)." - + "If level >= 2 then the handler used to service the request is logged.\n" + "Turn on inbound http request debugging for everything except the event queue (see debug eq).", + "If level >= 2 then the handler used to service the request is logged.\n" + "If level >= 1 then incoming HTTP requests are logged.\n" + "If level <= 0 then no extra http logging is done.\n", Debug); @@ -345,7 +345,7 @@ namespace OpenSim m_console.Commands.AddCommand("region", false, "backup", "backup", - "Persist objects to the database now", RunCommand); + "Persist currently unsaved object changes immediately instead of waiting for the normal persistence call.", RunCommand); m_console.Commands.AddCommand("region", false, "create region", "create region [\"region name\"] ", diff --git a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs index 0b76647f4d..9f27abc5e7 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs @@ -110,6 +110,7 @@ namespace OpenSim.Region.ClientStack.Linden false, "debug eq", "debug eq [0|1]", + "Turn on event queue debugging", "debug eq 1 will turn on event queue debugging. This will log all outgoing event queue messages to clients.\n" + "debug eq 0 will turn off event queue debugging.", HandleDebugEq); diff --git a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs index f416f067ee..776038290b 100644 --- a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs +++ b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs @@ -218,9 +218,8 @@ namespace OpenSim.Region.CoreModules.World.Permissions m_scene.AddCommand(this, "debug permissions", "debug permissions ", - "Enable permissions debugging", - HandleDebugPermissions); - + "Turn on permissions debugging", + HandleDebugPermissions); string grant = myConfig.GetString("GrantLSL",""); if (grant.Length > 0) { From 679a5f6c0b3c531e66311869646b972eb7cef834 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Tue, 29 Nov 2011 17:26:45 +0000 Subject: [PATCH 6/8] With "debug http 1", show the path with the query string instead of just the path. Also simplifies debug levels to just 0 and 1 --- .../Servers/HttpServer/BaseHttpServer.cs | 42 +++++++++---------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs index 689a292a6e..7bd1836fcf 100644 --- a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs +++ b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs @@ -447,14 +447,12 @@ namespace OpenSim.Framework.Servers.HttpServer string path = request.RawUrl; string handlerKey = GetHandlerKey(request.HttpMethod, path); - if (DebugLevel >= 1) - m_log.DebugFormat("[BASE HTTP SERVER]: Handling {0} request for {1}", request.HttpMethod, path); - if (TryGetStreamHandler(handlerKey, out requestHandler)) { - if (DebugLevel >= 2) + if (DebugLevel >= 1) m_log.DebugFormat( - "[BASE HTTP SERVER]: Found stream handler {0} for request to {1}", handlerKey, path); + "[BASE HTTP SERVER]: Found stream handler for {0} {1}", + request.HttpMethod, request.Url.PathAndQuery); // Okay, so this is bad, but should be considered temporary until everything is IStreamHandler. byte[] buffer = null; @@ -488,7 +486,6 @@ namespace OpenSim.Framework.Servers.HttpServer string[] querystringkeys = request.QueryString.AllKeys; string[] rHeaders = request.Headers.AllKeys; - foreach (string queryname in querystringkeys) { keysvals.Add(queryname, request.QueryString[queryname]); @@ -575,10 +572,10 @@ namespace OpenSim.Framework.Servers.HttpServer if (strAccept.Contains("application/llsd+xml") || strAccept.Contains("application/llsd+json")) { - if (DebugLevel >= 2) + if (DebugLevel >= 1) m_log.DebugFormat( - "[BASE HTTP SERVER]: Found an application/llsd+xml accept header for request to {0}", - path); + "[BASE HTTP SERVER]: Found application/llsd+xml accept header handler for {0} {1}", + request.HttpMethod, request.Url.PathAndQuery); HandleLLSDRequests(request, response); return; @@ -591,10 +588,10 @@ namespace OpenSim.Framework.Servers.HttpServer case null: case "text/html": - if (DebugLevel >= 2) + if (DebugLevel >= 1) m_log.DebugFormat( - "[BASE HTTP SERVER]: Found a {0} content type for request to {1}", - request.ContentType, path); + "[BASE HTTP SERVER]: Found a {0} content type handler for {1} {2}", + request.ContentType, request.HttpMethod, request.Url.PathAndQuery); HandleHTTPRequest(request, response); return; @@ -603,10 +600,10 @@ namespace OpenSim.Framework.Servers.HttpServer case "application/xml+llsd": case "application/llsd+json": - if (DebugLevel >= 2) + if (DebugLevel >= 1) m_log.DebugFormat( - "[BASE HTTP SERVER]: Found a {0} content type for request to {1}", - request.ContentType, path); + "[BASE HTTP SERVER]: Found a {0} content type handler for {1} {2}", + request.ContentType, request.HttpMethod, request.Url.PathAndQuery); HandleLLSDRequests(request, response); return; @@ -624,9 +621,10 @@ namespace OpenSim.Framework.Servers.HttpServer //m_log.Info("[Debug BASE HTTP SERVER]: Checking for LLSD Handler"); if (DoWeHaveALLSDHandler(request.RawUrl)) { - if (DebugLevel >= 2) + if (DebugLevel >= 1) m_log.DebugFormat( - "[BASE HTTP SERVER]: Found an LLSD handler for request to {0}", path); + "[BASE HTTP SERVER]: Found a {0} content type handler for {1} {2}", + request.ContentType, request.HttpMethod, request.Url.PathAndQuery); HandleLLSDRequests(request, response); return; @@ -635,17 +633,19 @@ namespace OpenSim.Framework.Servers.HttpServer // m_log.DebugFormat("[BASE HTTP SERVER]: Checking for HTTP Handler for request {0}", request.RawUrl); if (DoWeHaveAHTTPHandler(request.RawUrl)) { - if (DebugLevel >= 2) + if (DebugLevel >= 1) m_log.DebugFormat( - "[BASE HTTP SERVER]: Found an HTTP handler for request to {0}", path); + "[BASE HTTP SERVER]: Found a {0} content type handler for {1} {2}", + request.ContentType, request.HttpMethod, request.Url.PathAndQuery); HandleHTTPRequest(request, response); return; } - if (DebugLevel >= 2) + if (DebugLevel >= 1) m_log.DebugFormat( - "[BASE HTTP SERVER]: Treating request to {0} as a generic XMLRPC request", path); + "[BASE HTTP SERVER]: Assuming a generic XMLRPC request for {0} {1}", + request.HttpMethod, request.Url.PathAndQuery); // generic login request. HandleXmlRpcRequests(request, response); From fa63054c4f5cf970922c2fef386b084272c5491c Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Tue, 29 Nov 2011 20:37:03 +0000 Subject: [PATCH 7/8] On "show caps", stop excluding the seed cap but do exclude it elsewhere --- OpenSim/Capabilities/CapsHandlers.cs | 32 +++++++++---------- .../Servers/HttpServer/BaseHttpServer.cs | 4 ++- .../Linden/Caps/BunchOfCaps/BunchOfCaps.cs | 3 +- .../Framework/Caps/CapabilitiesModule.cs | 2 +- 4 files changed, 22 insertions(+), 19 deletions(-) diff --git a/OpenSim/Capabilities/CapsHandlers.cs b/OpenSim/Capabilities/CapsHandlers.cs index e1c800e907..a0e9ebca47 100644 --- a/OpenSim/Capabilities/CapsHandlers.cs +++ b/OpenSim/Capabilities/CapsHandlers.cs @@ -147,25 +147,25 @@ namespace OpenSim.Framework.Capabilities /// Return an LLSD-serializable Hashtable describing the /// capabilities and their handler details. /// - public Hashtable CapsDetails + /// If true, then exclude the seed cap. + public Hashtable GetCapsDetails(bool excludeSeed) { - get - { - Hashtable caps = new Hashtable(); - string protocol = "http://"; - - if (m_useSSL) - protocol = "https://"; + Hashtable caps = new Hashtable(); + string protocol = "http://"; + + if (m_useSSL) + protocol = "https://"; - string baseUrl = protocol + m_httpListenerHostName + ":" + m_httpListenerPort.ToString(); - foreach (string capsName in m_capsHandlers.Keys) - { - // skip SEED cap - if ("SEED" == capsName) continue; - caps[capsName] = baseUrl + m_capsHandlers[capsName].Path; - } - return caps; + string baseUrl = protocol + m_httpListenerHostName + ":" + m_httpListenerPort.ToString(); + foreach (string capsName in m_capsHandlers.Keys) + { + if (excludeSeed && "SEED" == capsName) + continue; + + caps[capsName] = baseUrl + m_capsHandlers[capsName].Path; } + + return caps; } } } diff --git a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs index 7bd1836fcf..6bffba511d 100644 --- a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs +++ b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs @@ -903,7 +903,9 @@ namespace OpenSim.Framework.Servers.HttpServer byte[] buf = Encoding.UTF8.GetBytes("Not found"); response.KeepAlive = false; - m_log.ErrorFormat("[BASE HTTP SERVER]: Handler not found for http request {0}", request.RawUrl); + m_log.ErrorFormat( + "[BASE HTTP SERVER]: Handler not found for http request {0} {1}", + request.HttpMethod, request.Url.PathAndQuery); response.SendChunked = false; response.ContentLength64 = buf.Length; diff --git a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs index 8f0ae76e20..07b4df3d3b 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs @@ -238,7 +238,8 @@ namespace OpenSim.Region.ClientStack.Linden return string.Empty; } - Hashtable caps = m_HostCapsObj.CapsHandlers.CapsDetails; + Hashtable caps = m_HostCapsObj.CapsHandlers.GetCapsDetails(true); + // Add the external too foreach (KeyValuePair kvp in m_HostCapsObj.ExternalCapsHandlers) caps[kvp.Key] = kvp.Value; diff --git a/OpenSim/Region/CoreModules/Framework/Caps/CapabilitiesModule.cs b/OpenSim/Region/CoreModules/Framework/Caps/CapabilitiesModule.cs index 780411f8f4..9d1538f52d 100644 --- a/OpenSim/Region/CoreModules/Framework/Caps/CapabilitiesModule.cs +++ b/OpenSim/Region/CoreModules/Framework/Caps/CapabilitiesModule.cs @@ -239,7 +239,7 @@ namespace OpenSim.Region.CoreModules.Framework { caps.AppendFormat("** User {0}:\n", kvp.Key); - for (IDictionaryEnumerator kvp2 = kvp.Value.CapsHandlers.CapsDetails.GetEnumerator(); kvp2.MoveNext(); ) + for (IDictionaryEnumerator kvp2 = kvp.Value.CapsHandlers.GetCapsDetails(false).GetEnumerator(); kvp2.MoveNext(); ) { Uri uri = new Uri(kvp2.Value.ToString()); caps.AppendFormat(m_showCapsCommandFormat, kvp2.Key, uri.PathAndQuery); From 2a9c9ae340e6ccf76412a03bd44af470558e2d93 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Tue, 29 Nov 2011 21:53:15 +0000 Subject: [PATCH 8/8] Provide more user feedback when "debug http" is set --- OpenSim/Region/Application/OpenSim.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index d97583cc87..4b38a2e2f7 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs @@ -894,6 +894,8 @@ namespace OpenSim if (int.TryParse(args[2], out newDebug)) { m_sceneManager.SetDebugPacketLevelOnCurrentScene(newDebug, name); + // We provide user information elsewhere if any clients had their debug level set. +// MainConsole.Instance.OutputFormat("Debug packet level set to {0}", newDebug); } else { @@ -910,6 +912,7 @@ namespace OpenSim if (int.TryParse(args[2], out newDebug)) { MainServer.Instance.DebugLevel = newDebug; + MainConsole.Instance.OutputFormat("Debug http level set to {0}", newDebug); break; } } @@ -945,7 +948,7 @@ namespace OpenSim break; default: - MainConsole.Instance.Output("Unknown debug"); + MainConsole.Instance.Output("Unknown debug command"); break; } }