diff options
Diffstat (limited to '')
3 files changed, 10 insertions, 15 deletions
diff --git a/OpenSim/Region/OptionalModules/Materials/MaterialsDemoModule.cs b/OpenSim/Region/OptionalModules/Materials/MaterialsDemoModule.cs index 3a39971..0a0d65c 100644 --- a/OpenSim/Region/OptionalModules/Materials/MaterialsDemoModule.cs +++ b/OpenSim/Region/OptionalModules/Materials/MaterialsDemoModule.cs | |||
@@ -139,18 +139,21 @@ namespace OpenSim.Region.OptionalModules.MaterialsDemoModule | |||
139 | { | 139 | { |
140 | string capsBase = "/CAPS/" + caps.CapsObjectPath; | 140 | string capsBase = "/CAPS/" + caps.CapsObjectPath; |
141 | 141 | ||
142 | IRequestHandler renderMaterialsPostHandler = new RestStreamHandler("POST", capsBase + "/", RenderMaterialsPostCap); | 142 | IRequestHandler renderMaterialsPostHandler |
143 | caps.RegisterHandler("RenderMaterials", renderMaterialsPostHandler); | 143 | = new RestStreamHandler("POST", capsBase + "/", RenderMaterialsPostCap, "RenderMaterialsPost", null); |
144 | caps.RegisterHandler("RenderMaterialsPost", renderMaterialsPostHandler); | ||
144 | 145 | ||
145 | // OpenSimulator CAPs infrastructure seems to be somewhat hostile towards any CAP that requires both GET | 146 | // OpenSimulator CAPs infrastructure seems to be somewhat hostile towards any CAP that requires both GET |
146 | // and POST handlers, (at least at the time this was originally written), so we first set up a POST | 147 | // and POST handlers, (at least at the time this was originally written), so we first set up a POST |
147 | // handler normally and then add a GET handler via MainServer | 148 | // handler normally and then add a GET handler via MainServer |
148 | 149 | ||
149 | IRequestHandler renderMaterialsGetHandler = new RestStreamHandler("GET", capsBase + "/", RenderMaterialsGetCap); | 150 | IRequestHandler renderMaterialsGetHandler |
151 | = new RestStreamHandler("GET", capsBase + "/", RenderMaterialsGetCap, "RenderMaterialsGet", null); | ||
150 | MainServer.Instance.AddStreamHandler(renderMaterialsGetHandler); | 152 | MainServer.Instance.AddStreamHandler(renderMaterialsGetHandler); |
151 | 153 | ||
152 | // materials viewer seems to use either POST or PUT, so assign POST handler for PUT as well | 154 | // materials viewer seems to use either POST or PUT, so assign POST handler for PUT as well |
153 | IRequestHandler renderMaterialsPutHandler = new RestStreamHandler("PUT", capsBase + "/", RenderMaterialsPostCap); | 155 | IRequestHandler renderMaterialsPutHandler |
156 | = new RestStreamHandler("PUT", capsBase + "/", RenderMaterialsPostCap, "RenderMaterialsPut", null); | ||
154 | MainServer.Instance.AddStreamHandler(renderMaterialsPutHandler); | 157 | MainServer.Instance.AddStreamHandler(renderMaterialsPutHandler); |
155 | } | 158 | } |
156 | 159 | ||
@@ -394,7 +397,6 @@ namespace OpenSim.Region.OptionalModules.MaterialsDemoModule | |||
394 | m_log.Debug("[MaterialsDemoModule]: null SOP for localId: " + matLocalID.ToString()); | 397 | m_log.Debug("[MaterialsDemoModule]: null SOP for localId: " + matLocalID.ToString()); |
395 | else | 398 | else |
396 | { | 399 | { |
397 | //var te = sop.Shape.Textures; | ||
398 | var te = new Primitive.TextureEntry(sop.Shape.TextureEntry, 0, sop.Shape.TextureEntry.Length); | 400 | var te = new Primitive.TextureEntry(sop.Shape.TextureEntry, 0, sop.Shape.TextureEntry.Length); |
399 | 401 | ||
400 | if (te == null) | 402 | if (te == null) |
@@ -413,14 +415,7 @@ namespace OpenSim.Region.OptionalModules.MaterialsDemoModule | |||
413 | if (te.DefaultTexture == null) | 415 | if (te.DefaultTexture == null) |
414 | m_log.Debug("[MaterialsDemoModule]: te.DefaultTexture is null"); | 416 | m_log.Debug("[MaterialsDemoModule]: te.DefaultTexture is null"); |
415 | else | 417 | else |
416 | { | 418 | te.DefaultTexture.MaterialID = id; |
417 | if (te.DefaultTexture.MaterialID == null) | ||
418 | m_log.Debug("[MaterialsDemoModule]: te.DefaultTexture.MaterialID is null"); | ||
419 | else | ||
420 | { | ||
421 | te.DefaultTexture.MaterialID = id; | ||
422 | } | ||
423 | } | ||
424 | } | 419 | } |
425 | else | 420 | else |
426 | { | 421 | { |
diff --git a/OpenSim/Region/OptionalModules/ViewerSupport/DynamicMenuModule.cs b/OpenSim/Region/OptionalModules/ViewerSupport/DynamicMenuModule.cs index 1ea1c20..6e0a80a 100644 --- a/OpenSim/Region/OptionalModules/ViewerSupport/DynamicMenuModule.cs +++ b/OpenSim/Region/OptionalModules/ViewerSupport/DynamicMenuModule.cs | |||
@@ -281,7 +281,7 @@ namespace OpenSim.Region.OptionalModules.ViewerSupport | |||
281 | m_module = module; | 281 | m_module = module; |
282 | } | 282 | } |
283 | 283 | ||
284 | public override byte[] Handle(string path, Stream request, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) | 284 | protected override byte[] ProcessRequest(string path, Stream request, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) |
285 | { | 285 | { |
286 | StreamReader reader = new StreamReader(request); | 286 | StreamReader reader = new StreamReader(request); |
287 | string requestBody = reader.ReadToEnd(); | 287 | string requestBody = reader.ReadToEnd(); |
diff --git a/OpenSim/Region/OptionalModules/World/WorldView/WorldViewRequestHandler.cs b/OpenSim/Region/OptionalModules/World/WorldView/WorldViewRequestHandler.cs index 550b5d4..8720cc7 100644 --- a/OpenSim/Region/OptionalModules/World/WorldView/WorldViewRequestHandler.cs +++ b/OpenSim/Region/OptionalModules/World/WorldView/WorldViewRequestHandler.cs | |||
@@ -55,7 +55,7 @@ namespace OpenSim.Region.OptionalModules.World.WorldView | |||
55 | m_WorldViewModule = fmodule; | 55 | m_WorldViewModule = fmodule; |
56 | } | 56 | } |
57 | 57 | ||
58 | public override byte[] Handle(string path, Stream requestData, | 58 | protected override byte[] ProcessRequest(string path, Stream requestData, |
59 | IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) | 59 | IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) |
60 | { | 60 | { |
61 | httpResponse.ContentType = "image/jpeg"; | 61 | httpResponse.ContentType = "image/jpeg"; |