diff options
author | teravus | 2013-01-21 22:08:51 -0500 |
---|---|---|
committer | teravus | 2013-01-21 22:08:51 -0500 |
commit | be60c0b0105e2d6929bb331ff86dfbcc45261221 (patch) | |
tree | d18a3a76c51317762f7a648a86aaeaf04ad17660 /OpenSim/Capabilities | |
parent | Merge remote-tracking branch 'remotes/origin/avination' into teravuswork (diff) | |
download | opensim-SC_OLD-be60c0b0105e2d6929bb331ff86dfbcc45261221.zip opensim-SC_OLD-be60c0b0105e2d6929bb331ff86dfbcc45261221.tar.gz opensim-SC_OLD-be60c0b0105e2d6929bb331ff86dfbcc45261221.tar.bz2 opensim-SC_OLD-be60c0b0105e2d6929bb331ff86dfbcc45261221.tar.xz |
* 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.
Diffstat (limited to 'OpenSim/Capabilities')
-rw-r--r-- | OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs | 26 |
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) |