From 5e4d6cab00cb29cd088ab7b62ab13aff103b64cb Mon Sep 17 00:00:00 2001 From: onefang Date: Sun, 19 May 2019 21:24:15 +1000 Subject: Dump OpenSim 0.9.0.1 into it's own branch. --- OpenSim/Capabilities/CapsHandlers.cs | 35 ++++++++++------------------------- 1 file changed, 10 insertions(+), 25 deletions(-) (limited to 'OpenSim/Capabilities/CapsHandlers.cs') diff --git a/OpenSim/Capabilities/CapsHandlers.cs b/OpenSim/Capabilities/CapsHandlers.cs index 890df90..f5a40df 100644 --- a/OpenSim/Capabilities/CapsHandlers.cs +++ b/OpenSim/Capabilities/CapsHandlers.cs @@ -53,31 +53,15 @@ namespace OpenSim.Framework.Capabilities /// base HTTP server /// host name of the HTTP server /// HTTP port - public CapsHandlers(BaseHttpServer httpListener, string httpListenerHostname, uint httpListenerPort) - : this(httpListener,httpListenerHostname,httpListenerPort, false) - { - } - - /// - /// CapsHandlers is a cap handler container but also takes - /// care of adding and removing cap handlers to and from the - /// supplied BaseHttpServer. - /// - /// base HTTP server - /// host name of the HTTP - /// server - /// HTTP port - public CapsHandlers(IHttpServer httpListener, string httpListenerHostname, uint httpListenerPort, bool https) - { + public CapsHandlers(IHttpServer httpListener, string httpListenerHostname, uint httpListenerPort) + { m_httpListener = httpListener; m_httpListenerHostName = httpListenerHostname; m_httpListenerPort = httpListenerPort; - m_useSSL = https; - if (httpListener != null && m_useSSL) - { - m_httpListenerHostName = httpListener.SSLCommonName; - m_httpListenerPort = httpListener.SSLPort; - } + if (httpListener != null && httpListener.UseSSL) + m_useSSL = true; + else + m_useSSL = false; } /// @@ -90,6 +74,7 @@ namespace OpenSim.Framework.Capabilities lock (m_capsHandlers) { m_httpListener.RemoveStreamHandler("POST", m_capsHandlers[capsName].Path); + m_httpListener.RemoveStreamHandler("PUT", m_capsHandlers[capsName].Path); m_httpListener.RemoveStreamHandler("GET", m_capsHandlers[capsName].Path); m_capsHandlers.Remove(capsName); } @@ -127,9 +112,9 @@ namespace OpenSim.Framework.Capabilities m_httpListener.RemoveStreamHandler("POST", m_capsHandlers[idx].Path); m_capsHandlers.Remove(idx); } - + if (null == value) return; - + m_capsHandlers[idx] = value; m_httpListener.AddStreamHandler(value); } @@ -162,7 +147,7 @@ namespace OpenSim.Framework.Capabilities { Hashtable caps = new Hashtable(); string protocol = "http://"; - + if (m_useSSL) protocol = "https://"; -- cgit v1.1