aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs26
1 files changed, 16 insertions, 10 deletions
diff --git a/OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs b/OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs
index f667b8f..68686c5 100644
--- a/OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs
+++ b/OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs
@@ -99,12 +99,23 @@ namespace OpenSim.Capabilities.Handlers
99 99
100 } 100 }
101 // OK, we have an array with preferred formats, possibly with only one entry 101 // OK, we have an array with preferred formats, possibly with only one entry
102 102 bool foundtexture = false;
103 foreach (string f in formats) 103 foreach (string f in formats)
104 { 104 {
105 if (FetchTexture(request, ret, textureID, f)) 105 foundtexture = FetchTexture(request, ret, textureID, f);
106 if (foundtexture)
106 break; 107 break;
107 } 108 }
109 if (!foundtexture)
110 {
111 ret["int_response_code"] = 404;
112 ret["error_status_text"] = "not found";
113 ret["str_response_string"] = "not found";
114 ret["content_type"] = "text/plain";
115 ret["keepalive"] = false;
116 ret["reusecontext"] = false;
117 ret["int_bytes"] = 0;
118 }
108 } 119 }
109 else 120 else
110 { 121 {
@@ -176,18 +187,13 @@ namespace OpenSim.Capabilities.Handlers
176 return true; 187 return true;
177 } 188 }
178 189
179 response = new Hashtable(); 190 //response = new Hashtable();
180 191
181 response["int_response_code"] = 404; 192
182 response["str_response_string"] = "not found";
183 response["content_type"] = "text/plain";
184 response["keepalive"] = false;
185 response["reusecontext"] = false;
186 response["int_bytes"] = 0;
187 //WriteTextureData(request,response,null,format); 193 //WriteTextureData(request,response,null,format);
188 // not found 194 // not found
189 //m_log.Warn("[GETTEXTURE]: Texture " + textureID + " not found"); 195 //m_log.Warn("[GETTEXTURE]: Texture " + textureID + " not found");
190 return true; 196 return false;
191 } 197 }
192 198
193 private void WriteTextureData(Hashtable request, Hashtable response, AssetBase texture, string format) 199 private void WriteTextureData(Hashtable request, Hashtable response, AssetBase texture, string format)