diff options
Diffstat (limited to 'OpenSim/Capabilities/Handlers/GetTexture')
-rw-r--r-- | OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs b/OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs index b3a4d61..86e7aa0 100644 --- a/OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs +++ b/OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs | |||
@@ -68,7 +68,7 @@ namespace OpenSim.Capabilities.Handlers | |||
68 | ret["content_type"] = "text/plain"; | 68 | ret["content_type"] = "text/plain"; |
69 | ret["keepalive"] = false; | 69 | ret["keepalive"] = false; |
70 | ret["reusecontext"] = false; | 70 | ret["reusecontext"] = false; |
71 | 71 | ret["int_bytes"] = 0; | |
72 | string textureStr = (string)request["texture_id"]; | 72 | string textureStr = (string)request["texture_id"]; |
73 | string format = (string)request["format"]; | 73 | string format = (string)request["format"]; |
74 | 74 | ||
@@ -223,6 +223,7 @@ namespace OpenSim.Capabilities.Handlers | |||
223 | { | 223 | { |
224 | response["int_response_code"] = (int)System.Net.HttpStatusCode.OK; | 224 | response["int_response_code"] = (int)System.Net.HttpStatusCode.OK; |
225 | response["bin_response_data"] = texture.Data; | 225 | response["bin_response_data"] = texture.Data; |
226 | response["int_bytes"] = texture.Data.Length; | ||
226 | } | 227 | } |
227 | else | 228 | else |
228 | { | 229 | { |
@@ -232,6 +233,7 @@ namespace OpenSim.Capabilities.Handlers | |||
232 | byte[] d = new byte[len]; | 233 | byte[] d = new byte[len]; |
233 | Array.Copy(texture.Data, start, d, 0, len); | 234 | Array.Copy(texture.Data, start, d, 0, len); |
234 | response["bin_response_data"] = d; | 235 | response["bin_response_data"] = d; |
236 | response["int_bytes"] = len; | ||
235 | } | 237 | } |
236 | // response.Body.Write(texture.Data, start, len); | 238 | // response.Body.Write(texture.Data, start, len); |
237 | } | 239 | } |
@@ -252,6 +254,8 @@ namespace OpenSim.Capabilities.Handlers | |||
252 | response["content_type"] = "image/" + format; | 254 | response["content_type"] = "image/" + format; |
253 | 255 | ||
254 | response["bin_response_data"] = texture.Data; | 256 | response["bin_response_data"] = texture.Data; |
257 | response["int_bytes"] = texture.Data.Length; | ||
258 | |||
255 | // response.Body.Write(texture.Data, 0, texture.Data.Length); | 259 | // response.Body.Write(texture.Data, 0, texture.Data.Length); |
256 | } | 260 | } |
257 | 261 | ||