aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs')
-rw-r--r--OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs23
1 files changed, 6 insertions, 17 deletions
diff --git a/OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs b/OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs
index 2499ce4..57ec2f5 100644
--- a/OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs
+++ b/OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs
@@ -249,24 +249,13 @@ namespace OpenSim.Capabilities.Handlers
249// m_log.Debug("Serving " + start + " to " + end + " of " + texture.Data.Length + " bytes for texture " + texture.ID); 249// m_log.Debug("Serving " + start + " to " + end + " of " + texture.Data.Length + " bytes for texture " + texture.ID);
250 250
251 response["content-type"] = texture.Metadata.ContentType; 251 response["content-type"] = texture.Metadata.ContentType;
252 response["int_response_code"] = (int)System.Net.HttpStatusCode.PartialContent;
253 headers["Content-Range"] = String.Format("bytes {0}-{1}/{2}", start, end, texture.Data.Length);
252 254
253 if (start == 0 && len == texture.Data.Length) // well redudante maybe 255 byte[] d = new byte[len];
254 { 256 Array.Copy(texture.Data, start, d, 0, len);
255 response["int_response_code"] = (int)System.Net.HttpStatusCode.OK; 257 response["bin_response_data"] = d;
256 response["bin_response_data"] = texture.Data; 258 response["int_bytes"] = len;
257 response["int_bytes"] = texture.Data.Length;
258 }
259 else
260 {
261 response["int_response_code"] = (int)System.Net.HttpStatusCode.PartialContent;
262 headers["Content-Range"] = String.Format("bytes {0}-{1}/{2}", start, end, texture.Data.Length);
263
264 byte[] d = new byte[len];
265 Array.Copy(texture.Data, start, d, 0, len);
266 response["bin_response_data"] = d;
267 response["int_bytes"] = len;
268 }
269// response.Body.Write(texture.Data, start, len);
270 } 259 }
271 } 260 }
272 else 261 else