Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
commit
ea371a6f54
|
@ -139,21 +139,18 @@ namespace OpenSim.Region.OptionalModules.MaterialsDemoModule
|
||||||
{
|
{
|
||||||
string capsBase = "/CAPS/" + caps.CapsObjectPath;
|
string capsBase = "/CAPS/" + caps.CapsObjectPath;
|
||||||
|
|
||||||
IRequestHandler renderMaterialsPostHandler
|
IRequestHandler renderMaterialsPostHandler = new RestStreamHandler("POST", capsBase + "/", RenderMaterialsPostCap);
|
||||||
= new RestStreamHandler("POST", capsBase + "/", RenderMaterialsPostCap, "RenderMaterialsPost", null);
|
caps.RegisterHandler("RenderMaterials", renderMaterialsPostHandler);
|
||||||
caps.RegisterHandler("RenderMaterialsPost", renderMaterialsPostHandler);
|
|
||||||
|
|
||||||
// OpenSimulator CAPs infrastructure seems to be somewhat hostile towards any CAP that requires both GET
|
// 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
|
// 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
|
// handler normally and then add a GET handler via MainServer
|
||||||
|
|
||||||
IRequestHandler renderMaterialsGetHandler
|
IRequestHandler renderMaterialsGetHandler = new RestStreamHandler("GET", capsBase + "/", RenderMaterialsGetCap);
|
||||||
= new RestStreamHandler("GET", capsBase + "/", RenderMaterialsGetCap, "RenderMaterialsGet", null);
|
|
||||||
MainServer.Instance.AddStreamHandler(renderMaterialsGetHandler);
|
MainServer.Instance.AddStreamHandler(renderMaterialsGetHandler);
|
||||||
|
|
||||||
// materials viewer seems to use either POST or PUT, so assign POST handler for PUT as well
|
// materials viewer seems to use either POST or PUT, so assign POST handler for PUT as well
|
||||||
IRequestHandler renderMaterialsPutHandler
|
IRequestHandler renderMaterialsPutHandler = new RestStreamHandler("PUT", capsBase + "/", RenderMaterialsPostCap);
|
||||||
= new RestStreamHandler("PUT", capsBase + "/", RenderMaterialsPostCap, "RenderMaterialsPut", null);
|
|
||||||
MainServer.Instance.AddStreamHandler(renderMaterialsPutHandler);
|
MainServer.Instance.AddStreamHandler(renderMaterialsPutHandler);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue