From 89676b8a48c30647f0150c7e2b0da0ba6c932265 Mon Sep 17 00:00:00 2001 From: teravus Date: Mon, 21 Jan 2013 21:32:48 -0500 Subject: * The fallthrough of FetchTexture was no longer resulting in a 404 response on missing textures. It was just waiting and no event was being provided. This re-enables the 404 response. --- OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'OpenSim/Capabilities') diff --git a/OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs b/OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs index 6437d0b..f667b8f 100644 --- a/OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs +++ b/OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs @@ -176,8 +176,17 @@ namespace OpenSim.Capabilities.Handlers return true; } + response = new Hashtable(); + + response["int_response_code"] = 404; + response["str_response_string"] = "not found"; + response["content_type"] = "text/plain"; + response["keepalive"] = false; + response["reusecontext"] = false; + response["int_bytes"] = 0; + //WriteTextureData(request,response,null,format); // not found -// m_log.Warn("[GETTEXTURE]: Texture " + textureID + " not found"); + //m_log.Warn("[GETTEXTURE]: Texture " + textureID + " not found"); return true; } -- cgit v1.1 From be60c0b0105e2d6929bb331ff86dfbcc45261221 Mon Sep 17 00:00:00 2001 From: teravus Date: Mon, 21 Jan 2013 22:08:51 -0500 Subject: * A better way to handle the last fix (This is in case the viewer provides a list of preferred formats, though, technically, the sim would pick the first provided format the old way). This just makes it more obvious what's happening. --- .../Handlers/GetTexture/GetTextureHandler.cs | 26 +++++++++++++--------- 1 file changed, 16 insertions(+), 10 deletions(-) (limited to 'OpenSim/Capabilities') 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 } // OK, we have an array with preferred formats, possibly with only one entry - + bool foundtexture = false; foreach (string f in formats) { - if (FetchTexture(request, ret, textureID, f)) + foundtexture = FetchTexture(request, ret, textureID, f); + if (foundtexture) break; } + if (!foundtexture) + { + ret["int_response_code"] = 404; + ret["error_status_text"] = "not found"; + ret["str_response_string"] = "not found"; + ret["content_type"] = "text/plain"; + ret["keepalive"] = false; + ret["reusecontext"] = false; + ret["int_bytes"] = 0; + } } else { @@ -176,18 +187,13 @@ namespace OpenSim.Capabilities.Handlers return true; } - response = new Hashtable(); + //response = new Hashtable(); - response["int_response_code"] = 404; - response["str_response_string"] = "not found"; - response["content_type"] = "text/plain"; - response["keepalive"] = false; - response["reusecontext"] = false; - response["int_bytes"] = 0; + //WriteTextureData(request,response,null,format); // not found //m_log.Warn("[GETTEXTURE]: Texture " + textureID + " not found"); - return true; + return false; } private void WriteTextureData(Hashtable request, Hashtable response, AssetBase texture, string format) -- cgit v1.1