aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Communications/Capabilities/Caps.cs
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-03-20 20:04:45 +0000
committerJustin Clarke Casey2008-03-20 20:04:45 +0000
commitc1beb85315aad09197ca7ffaa8ec194346af82cb (patch)
tree2554ed107ef378a3fdab9ec23d6760a6962a92a0 /OpenSim/Framework/Communications/Capabilities/Caps.cs
parentAdded back a fix that lbsa71 did aqes ago to fix a buffer overflow in the pac... (diff)
downloadopensim-SC-c1beb85315aad09197ca7ffaa8ec194346af82cb.zip
opensim-SC-c1beb85315aad09197ca7ffaa8ec194346af82cb.tar.gz
opensim-SC-c1beb85315aad09197ca7ffaa8ec194346af82cb.tar.bz2
opensim-SC-c1beb85315aad09197ca7ffaa8ec194346af82cb.tar.xz
* 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.
Diffstat (limited to 'OpenSim/Framework/Communications/Capabilities/Caps.cs')
-rw-r--r--OpenSim/Framework/Communications/Capabilities/Caps.cs11
1 files changed, 10 insertions, 1 deletions
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
62 private string m_httpListenerHostName; 62 private string m_httpListenerHostName;
63 private uint m_httpListenPort; 63 private uint m_httpListenPort;
64 64
65 private string m_capsObjectPath = "00001-"; 65 /// <summary>
66 /// This is the uuid portion of every CAPS path. It is used to make capability urls private to the requester.
67 /// </summary>
68 private string m_capsObjectPath;
69 public string CapsObjectPath { get { return m_capsObjectPath; } }
70
66 private string m_requestPath = "0000/"; 71 private string m_requestPath = "0000/";
67 private string m_mapLayerPath = "0001/"; 72 private string m_mapLayerPath = "0001/";
68 private string m_newInventory = "0002/"; 73 private string m_newInventory = "0002/";
@@ -109,9 +114,12 @@ namespace OpenSim.Region.Capabilities
109 114
110 try 115 try
111 { 116 {
117 m_httpListener.RemoveStreamHandler("POST", capsBase + m_mapLayerPath);
112 m_httpListener.AddStreamHandler( 118 m_httpListener.AddStreamHandler(
113 new LLSDStreamhandler<LLSDMapRequest, LLSDMapLayerResponse>("POST", capsBase + m_mapLayerPath, 119 new LLSDStreamhandler<LLSDMapRequest, LLSDMapLayerResponse>("POST", capsBase + m_mapLayerPath,
114 GetMapLayer)); 120 GetMapLayer));
121
122 m_httpListener.RemoveStreamHandler("POST", capsBase + m_newInventory);
115 m_httpListener.AddStreamHandler( 123 m_httpListener.AddStreamHandler(
116 new LLSDStreamhandler<LLSDAssetUploadRequest, LLSDAssetUploadResponse>("POST", 124 new LLSDStreamhandler<LLSDAssetUploadRequest, LLSDAssetUploadResponse>("POST",
117 capsBase + m_newInventory, 125 capsBase + m_newInventory,
@@ -142,6 +150,7 @@ namespace OpenSim.Region.Capabilities
142 private void AddLegacyCapsHandler(BaseHttpServer httpListener, string path, RestMethod restMethod) 150 private void AddLegacyCapsHandler(BaseHttpServer httpListener, string path, RestMethod restMethod)
143 { 151 {
144 string capsBase = "/CAPS/" + m_capsObjectPath; 152 string capsBase = "/CAPS/" + m_capsObjectPath;
153 httpListener.RemoveStreamHandler("POST", capsBase + path);
145 httpListener.AddStreamHandler(new RestStreamHandler("POST", capsBase + path, restMethod)); 154 httpListener.AddStreamHandler(new RestStreamHandler("POST", capsBase + path, restMethod));
146 } 155 }
147 156