Try naming the materials handlers again, this time registering the POST as RenderMaterials
This was probably the mistake. The other handlers are named RenderMaterials as well but this actully has no affect apart from on stats, due to a (counterintuitive) disconnect between the registration name and the name of the request handler. Will be tested very soon and reverted if this still does not work.cpu-performance
parent
7c2e4786ce
commit
ba8f9c9d0a
|
@ -139,18 +139,21 @@ namespace OpenSim.Region.OptionalModules.MaterialsDemoModule
|
|||
{
|
||||
string capsBase = "/CAPS/" + caps.CapsObjectPath;
|
||||
|
||||
IRequestHandler renderMaterialsPostHandler = new RestStreamHandler("POST", capsBase + "/", RenderMaterialsPostCap);
|
||||
IRequestHandler renderMaterialsPostHandler
|
||||
= new RestStreamHandler("POST", capsBase + "/", RenderMaterialsPostCap, "RenderMaterials", null);
|
||||
caps.RegisterHandler("RenderMaterials", renderMaterialsPostHandler);
|
||||
|
||||
// OpenSimulator CAPs infrastructure seems to be somewhat hostile towards any CAP that requires both GET
|
||||
// and POST handlers, (at least at the time this was originally written), so we first set up a POST
|
||||
// handler normally and then add a GET handler via MainServer
|
||||
|
||||
IRequestHandler renderMaterialsGetHandler = new RestStreamHandler("GET", capsBase + "/", RenderMaterialsGetCap);
|
||||
IRequestHandler renderMaterialsGetHandler
|
||||
= new RestStreamHandler("GET", capsBase + "/", RenderMaterialsGetCap, "RenderMaterials", null);
|
||||
MainServer.Instance.AddStreamHandler(renderMaterialsGetHandler);
|
||||
|
||||
// materials viewer seems to use either POST or PUT, so assign POST handler for PUT as well
|
||||
IRequestHandler renderMaterialsPutHandler = new RestStreamHandler("PUT", capsBase + "/", RenderMaterialsPostCap);
|
||||
IRequestHandler renderMaterialsPutHandler
|
||||
= new RestStreamHandler("PUT", capsBase + "/", RenderMaterialsPostCap, "RenderMaterials", null);
|
||||
MainServer.Instance.AddStreamHandler(renderMaterialsPutHandler);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue