From fa63054c4f5cf970922c2fef386b084272c5491c Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 29 Nov 2011 20:37:03 +0000 Subject: On "show caps", stop excluding the seed cap but do exclude it elsewhere --- OpenSim/Capabilities/CapsHandlers.cs | 30 +++++++++++----------- .../Framework/Servers/HttpServer/BaseHttpServer.cs | 4 ++- .../Linden/Caps/BunchOfCaps/BunchOfCaps.cs | 3 ++- .../Framework/Caps/CapabilitiesModule.cs | 2 +- 4 files changed, 21 insertions(+), 18 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Capabilities/CapsHandlers.cs b/OpenSim/Capabilities/CapsHandlers.cs index e1c800e..a0e9ebc 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://"; + + string baseUrl = protocol + m_httpListenerHostName + ":" + m_httpListenerPort.ToString(); + foreach (string capsName in m_capsHandlers.Keys) { - Hashtable caps = new Hashtable(); - string protocol = "http://"; - - if (m_useSSL) - protocol = "https://"; + if (excludeSeed && "SEED" == capsName) + continue; - 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; + 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 7bd1836..6bffba5 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 8f0ae76..07b4df3 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 780411f..9d1538f 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); -- cgit v1.1