diff options
Diffstat (limited to '')
8 files changed, 31 insertions, 19 deletions
diff --git a/OpenSim/Capabilities/Handlers/FetchInventory2/FetchInventory2ServerConnector.cs b/OpenSim/Capabilities/Handlers/FetchInventory2/FetchInventory2ServerConnector.cs index 0ba8931..5bab52f 100644 --- a/OpenSim/Capabilities/Handlers/FetchInventory2/FetchInventory2ServerConnector.cs +++ b/OpenSim/Capabilities/Handlers/FetchInventory2/FetchInventory2ServerConnector.cs | |||
@@ -63,7 +63,8 @@ namespace OpenSim.Capabilities.Handlers | |||
63 | 63 | ||
64 | FetchInventory2Handler fiHandler = new FetchInventory2Handler(m_InventoryService); | 64 | FetchInventory2Handler fiHandler = new FetchInventory2Handler(m_InventoryService); |
65 | IRequestHandler reqHandler | 65 | IRequestHandler reqHandler |
66 | = new RestStreamHandler("POST", "/CAPS/FetchInventory/", fiHandler.FetchInventoryRequest); | 66 | = new RestStreamHandler( |
67 | "POST", "/CAPS/FetchInventory/", fiHandler.FetchInventoryRequest, "FetchInventory", null); | ||
67 | server.AddStreamHandler(reqHandler); | 68 | server.AddStreamHandler(reqHandler); |
68 | } | 69 | } |
69 | } | 70 | } |
diff --git a/OpenSim/Capabilities/Handlers/GetMesh/GetMeshServerConnector.cs b/OpenSim/Capabilities/Handlers/GetMesh/GetMeshServerConnector.cs index 2ecfa3c..8a275f3 100644 --- a/OpenSim/Capabilities/Handlers/GetMesh/GetMeshServerConnector.cs +++ b/OpenSim/Capabilities/Handlers/GetMesh/GetMeshServerConnector.cs | |||
@@ -66,13 +66,14 @@ namespace OpenSim.Capabilities.Handlers | |||
66 | throw new Exception(String.Format("Failed to load AssetService from {0}; config is {1}", assetService, m_ConfigName)); | 66 | throw new Exception(String.Format("Failed to load AssetService from {0}; config is {1}", assetService, m_ConfigName)); |
67 | 67 | ||
68 | GetMeshHandler gmeshHandler = new GetMeshHandler(m_AssetService); | 68 | GetMeshHandler gmeshHandler = new GetMeshHandler(m_AssetService); |
69 | IRequestHandler reqHandler = new RestHTTPHandler("GET", "/CAPS/" + UUID.Random(), | 69 | IRequestHandler reqHandler |
70 | delegate(Hashtable m_dhttpMethod) | 70 | = new RestHTTPHandler( |
71 | { | 71 | "GET", |
72 | return gmeshHandler.ProcessGetMesh(m_dhttpMethod, UUID.Zero, null); | 72 | "/CAPS/" + UUID.Random(), |
73 | }); | 73 | httpMethod => gmeshHandler.ProcessGetMesh(httpMethod, UUID.Zero, null), |
74 | "GetMesh", | ||
75 | null); | ||
74 | server.AddStreamHandler(reqHandler); | 76 | server.AddStreamHandler(reqHandler); |
75 | } | 77 | } |
76 | |||
77 | } | 78 | } |
78 | } | 79 | } \ No newline at end of file |
diff --git a/OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs b/OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs index 217217e..abdbc72 100644 --- a/OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs +++ b/OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs | |||
@@ -58,8 +58,8 @@ namespace OpenSim.Capabilities.Handlers | |||
58 | // TODO: Change this to a config option | 58 | // TODO: Change this to a config option |
59 | const string REDIRECT_URL = null; | 59 | const string REDIRECT_URL = null; |
60 | 60 | ||
61 | public GetTextureHandler(string path, IAssetService assService) : | 61 | public GetTextureHandler(string path, IAssetService assService, string name, string description) |
62 | base("GET", path) | 62 | : base("GET", path, name, description) |
63 | { | 63 | { |
64 | m_assetService = assService; | 64 | m_assetService = assService; |
65 | } | 65 | } |
diff --git a/OpenSim/Capabilities/Handlers/GetTexture/GetTextureServerConnector.cs b/OpenSim/Capabilities/Handlers/GetTexture/GetTextureServerConnector.cs index 0d072f7..71cf033 100644 --- a/OpenSim/Capabilities/Handlers/GetTexture/GetTextureServerConnector.cs +++ b/OpenSim/Capabilities/Handlers/GetTexture/GetTextureServerConnector.cs | |||
@@ -62,8 +62,8 @@ namespace OpenSim.Capabilities.Handlers | |||
62 | if (m_AssetService == null) | 62 | if (m_AssetService == null) |
63 | throw new Exception(String.Format("Failed to load AssetService from {0}; config is {1}", assetService, m_ConfigName)); | 63 | throw new Exception(String.Format("Failed to load AssetService from {0}; config is {1}", assetService, m_ConfigName)); |
64 | 64 | ||
65 | server.AddStreamHandler(new GetTextureHandler("/CAPS/GetTexture/" /*+ UUID.Random() */, m_AssetService)); | 65 | server.AddStreamHandler( |
66 | new GetTextureHandler("/CAPS/GetTexture/" /*+ UUID.Random() */, m_AssetService, "GetTexture", null)); | ||
66 | } | 67 | } |
67 | |||
68 | } | 68 | } |
69 | } | 69 | } \ No newline at end of file |
diff --git a/OpenSim/Capabilities/Handlers/GetTexture/Tests/GetTextureHandlerTests.cs b/OpenSim/Capabilities/Handlers/GetTexture/Tests/GetTextureHandlerTests.cs index fd152c3..761e4e7 100644 --- a/OpenSim/Capabilities/Handlers/GetTexture/Tests/GetTextureHandlerTests.cs +++ b/OpenSim/Capabilities/Handlers/GetTexture/Tests/GetTextureHandlerTests.cs | |||
@@ -50,9 +50,9 @@ namespace OpenSim.Capabilities.Handlers.GetTexture.Tests | |||
50 | TestHelpers.InMethod(); | 50 | TestHelpers.InMethod(); |
51 | 51 | ||
52 | // Overkill - we only really need the asset service, not a whole scene. | 52 | // Overkill - we only really need the asset service, not a whole scene. |
53 | Scene scene = SceneHelpers.SetupScene(); | 53 | Scene scene = new SceneHelpers().SetupScene(); |
54 | 54 | ||
55 | GetTextureHandler handler = new GetTextureHandler(null, scene.AssetService); | 55 | GetTextureHandler handler = new GetTextureHandler(null, scene.AssetService, "TestGetTexture", null); |
56 | TestOSHttpRequest req = new TestOSHttpRequest(); | 56 | TestOSHttpRequest req = new TestOSHttpRequest(); |
57 | TestOSHttpResponse resp = new TestOSHttpResponse(); | 57 | TestOSHttpResponse resp = new TestOSHttpResponse(); |
58 | req.Url = new Uri("http://localhost/?texture_id=00000000-0000-1111-9999-000000000012"); | 58 | req.Url = new Uri("http://localhost/?texture_id=00000000-0000-1111-9999-000000000012"); |
diff --git a/OpenSim/Capabilities/Handlers/UploadBakedTexture/UploadBakedTextureHandler.cs b/OpenSim/Capabilities/Handlers/UploadBakedTexture/UploadBakedTextureHandler.cs index 594ce9d..8849a59 100644 --- a/OpenSim/Capabilities/Handlers/UploadBakedTexture/UploadBakedTextureHandler.cs +++ b/OpenSim/Capabilities/Handlers/UploadBakedTexture/UploadBakedTextureHandler.cs | |||
@@ -85,8 +85,8 @@ namespace OpenSim.Capabilities.Handlers | |||
85 | uploader.OnUpLoad += BakedTextureUploaded; | 85 | uploader.OnUpLoad += BakedTextureUploaded; |
86 | 86 | ||
87 | m_HostCapsObj.HttpListener.AddStreamHandler( | 87 | m_HostCapsObj.HttpListener.AddStreamHandler( |
88 | new BinaryStreamHandler("POST", capsBase + uploaderPath, | 88 | new BinaryStreamHandler( |
89 | uploader.uploaderCaps)); | 89 | "POST", capsBase + uploaderPath, uploader.uploaderCaps, "UploadBakedTexture", null)); |
90 | 90 | ||
91 | string protocol = "http://"; | 91 | string protocol = "http://"; |
92 | 92 | ||
diff --git a/OpenSim/Capabilities/Handlers/WebFetchInventoryDescendents/WebFetchInvDescServerConnector.cs b/OpenSim/Capabilities/Handlers/WebFetchInventoryDescendents/WebFetchInvDescServerConnector.cs index 92eeb14..5d86557 100644 --- a/OpenSim/Capabilities/Handlers/WebFetchInventoryDescendents/WebFetchInvDescServerConnector.cs +++ b/OpenSim/Capabilities/Handlers/WebFetchInventoryDescendents/WebFetchInvDescServerConnector.cs | |||
@@ -68,7 +68,13 @@ namespace OpenSim.Capabilities.Handlers | |||
68 | ServerUtils.LoadPlugin<ILibraryService>(libService, args); | 68 | ServerUtils.LoadPlugin<ILibraryService>(libService, args); |
69 | 69 | ||
70 | WebFetchInvDescHandler webFetchHandler = new WebFetchInvDescHandler(m_InventoryService, m_LibraryService); | 70 | WebFetchInvDescHandler webFetchHandler = new WebFetchInvDescHandler(m_InventoryService, m_LibraryService); |
71 | IRequestHandler reqHandler = new RestStreamHandler("POST", "/CAPS/WebFetchInvDesc/" /*+ UUID.Random()*/, webFetchHandler.FetchInventoryDescendentsRequest); | 71 | IRequestHandler reqHandler |
72 | = new RestStreamHandler( | ||
73 | "POST", | ||
74 | "/CAPS/WebFetchInvDesc/" /*+ UUID.Random()*/, | ||
75 | webFetchHandler.FetchInventoryDescendentsRequest, | ||
76 | "WebFetchInvDesc", | ||
77 | null); | ||
72 | server.AddStreamHandler(reqHandler); | 78 | server.AddStreamHandler(reqHandler); |
73 | } | 79 | } |
74 | 80 | ||
diff --git a/OpenSim/Capabilities/LLSDStreamHandler.cs b/OpenSim/Capabilities/LLSDStreamHandler.cs index c7c1fc9..f5c728c 100644 --- a/OpenSim/Capabilities/LLSDStreamHandler.cs +++ b/OpenSim/Capabilities/LLSDStreamHandler.cs | |||
@@ -39,7 +39,11 @@ namespace OpenSim.Framework.Capabilities | |||
39 | private LLSDMethod<TRequest, TResponse> m_method; | 39 | private LLSDMethod<TRequest, TResponse> m_method; |
40 | 40 | ||
41 | public LLSDStreamhandler(string httpMethod, string path, LLSDMethod<TRequest, TResponse> method) | 41 | public LLSDStreamhandler(string httpMethod, string path, LLSDMethod<TRequest, TResponse> method) |
42 | : base(httpMethod, path) | 42 | : this(httpMethod, path, method, null, null) {} |
43 | |||
44 | public LLSDStreamhandler( | ||
45 | string httpMethod, string path, LLSDMethod<TRequest, TResponse> method, string name, string description) | ||
46 | : base(httpMethod, path, name, description) | ||
43 | { | 47 | { |
44 | m_method = method; | 48 | m_method = method; |
45 | } | 49 | } |