aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Capabilities/Handlers/GetTexture
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Capabilities/Handlers/GetTexture')
-rw-r--r--OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs6
-rw-r--r--OpenSim/Capabilities/Handlers/GetTexture/GetTextureServerConnector.cs6
-rw-r--r--OpenSim/Capabilities/Handlers/GetTexture/Tests/GetTextureHandlerTests.cs4
3 files changed, 7 insertions, 9 deletions
diff --git a/OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs b/OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs
index 0797215..f040ff7 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 }
@@ -77,7 +77,6 @@ namespace OpenSim.Capabilities.Handlers
77 { 77 {
78 m_log.Error("[GETTEXTURE]: Cannot fetch texture " + textureStr + " without an asset service"); 78 m_log.Error("[GETTEXTURE]: Cannot fetch texture " + textureStr + " without an asset service");
79 httpResponse.StatusCode = (int)System.Net.HttpStatusCode.NotFound; 79 httpResponse.StatusCode = (int)System.Net.HttpStatusCode.NotFound;
80 return null;
81 } 80 }
82 81
83 UUID textureID; 82 UUID textureID;
@@ -115,7 +114,6 @@ namespace OpenSim.Capabilities.Handlers
115// "[GETTEXTURE]: For texture {0} sending back response {1}, data length {2}", 114// "[GETTEXTURE]: For texture {0} sending back response {1}, data length {2}",
116// textureID, httpResponse.StatusCode, httpResponse.ContentLength); 115// textureID, httpResponse.StatusCode, httpResponse.ContentLength);
117 116
118 httpResponse.Send();
119 return null; 117 return null;
120 } 118 }
121 119
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");