From c1beb85315aad09197ca7ffaa8ec194346af82cb Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Thu, 20 Mar 2008 20:04:45 +0000 Subject: * First draft resolution of mantis 777, 734, 389 - scripts do not save in non-home regions * Should work in multi-region standalone and grid modes * This should also solve other non-home region caps issues (map requests, RC client inventory requests, etc) * We now pass CAPS information on to the destination region on region crossing, and set up a CAPS object when an agent becomes a master * Current limitation is that this will only work if your http_listener_port is 9000 * This is a very early code cut (lots of bad practice, hard coding and inefficiency). However, I wanted to get this out there for feedback and my own sanity. Next few patches will clean up the mess. --- OpenSim/Framework/Communications/Capabilities/Caps.cs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'OpenSim/Framework/Communications/Capabilities/Caps.cs') diff --git a/OpenSim/Framework/Communications/Capabilities/Caps.cs b/OpenSim/Framework/Communications/Capabilities/Caps.cs index 878b0cc..fad4741 100644 --- a/OpenSim/Framework/Communications/Capabilities/Caps.cs +++ b/OpenSim/Framework/Communications/Capabilities/Caps.cs @@ -62,7 +62,12 @@ namespace OpenSim.Region.Capabilities private string m_httpListenerHostName; private uint m_httpListenPort; - private string m_capsObjectPath = "00001-"; + /// + /// This is the uuid portion of every CAPS path. It is used to make capability urls private to the requester. + /// + private string m_capsObjectPath; + public string CapsObjectPath { get { return m_capsObjectPath; } } + private string m_requestPath = "0000/"; private string m_mapLayerPath = "0001/"; private string m_newInventory = "0002/"; @@ -109,9 +114,12 @@ namespace OpenSim.Region.Capabilities try { + m_httpListener.RemoveStreamHandler("POST", capsBase + m_mapLayerPath); m_httpListener.AddStreamHandler( new LLSDStreamhandler("POST", capsBase + m_mapLayerPath, GetMapLayer)); + + m_httpListener.RemoveStreamHandler("POST", capsBase + m_newInventory); m_httpListener.AddStreamHandler( new LLSDStreamhandler("POST", capsBase + m_newInventory, @@ -142,6 +150,7 @@ namespace OpenSim.Region.Capabilities private void AddLegacyCapsHandler(BaseHttpServer httpListener, string path, RestMethod restMethod) { string capsBase = "/CAPS/" + m_capsObjectPath; + httpListener.RemoveStreamHandler("POST", capsBase + path); httpListener.AddStreamHandler(new RestStreamHandler("POST", capsBase + path, restMethod)); } -- cgit v1.1