diff options
Diffstat (limited to 'OpenSim/Framework/Communications')
-rw-r--r-- | OpenSim/Framework/Communications/Capabilities/Caps.cs | 11 |
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 | ||