diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 4bdcd40a74..5842932127 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs @@ -93,7 +93,7 @@ namespace OpenSim.Region.Environment.Scenes protected SceneXmlLoader m_sceneXmlLoader; protected Dictionary m_capsHandlers = new Dictionary(); - protected BaseHttpServer httpListener; + protected BaseHttpServer m_httpListener; protected Dictionary Modules = new Dictionary(); public Dictionary ModuleInterfaces = new Dictionary(); @@ -280,7 +280,7 @@ namespace OpenSim.Region.Environment.Scenes m_log.Info("[SCENE]: Creating LandMap"); Terrain = new TerrainEngine((int)RegionInfo.RegionLocX, (int)RegionInfo.RegionLocY); - httpListener = httpServer; + m_httpListener = httpServer; m_dumpAssetsToFile = dumpAssetsToFile; if ((RegionInfo.EstateSettings.regionFlags & Simulator.RegionFlags.SkipScripts) == Simulator.RegionFlags.SkipScripts) @@ -1609,11 +1609,11 @@ namespace OpenSim.Region.Environment.Scenes { m_log.Debug("[CONNECTION DEBUGGING]: Setting up CAPS handler for " + agent.AgentID.ToString() + " at " + agent.CapsPath.ToString()); Caps cap = - new Caps(AssetCache, httpListener, m_regInfo.ExternalHostName, httpListener.Port, + new Caps(AssetCache, m_httpListener, m_regInfo.ExternalHostName, m_httpListener.Port, agent.CapsPath, agent.AgentID, m_dumpAssetsToFile); Util.SetCapsURL(agent.AgentID, - "http://" + m_regInfo.ExternalHostName + ":" + httpListener.Port.ToString() + + "http://" + m_regInfo.ExternalHostName + ":" + m_httpListener.Port.ToString() + "/CAPS/" + agent.CapsPath + "0000/"); cap.RegisterHandlers(); if (agent.child) @@ -2582,5 +2582,34 @@ namespace OpenSim.Region.Environment.Scenes } #endregion + + #region BaseHTTPServer wrapper methods + + public bool AddHTTPHandler(string method, GenericHTTPMethod handler) + { + return m_httpListener.AddHTTPHandler(method, handler); + } + + public bool AddXmlRPCHandler(string method, XmlRpcMethod handler) + { + return m_httpListener.AddXmlRPCHandler(method, handler); + } + + public void AddStreamHandler(IRequestHandler handler) + { + m_httpListener.AddStreamHandler(handler); + } + + public void RemoveStreamHandler(string httpMethod, string path) + { + m_httpListener.RemoveStreamHandler(httpMethod, path); + } + + public void RemoveHTTPHandler(string httpMethod, string path) + { + m_httpListener.RemoveHTTPHandler(httpMethod, path); + } + + #endregion } }