From 4e9f50b878ae9d09e976ea7bc81f230ce9637cf4 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 9 Dec 2011 22:32:28 +0000 Subject: Add commented log lines to FetchInventoryDescendents2 path for future use. Haven't been able to resolve issue where attachments are removed by the viewer on relog on a localhost --- .../Capabilities/Handlers/GetTexture/GetTextureHandler.cs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs') diff --git a/OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs b/OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs index ae95821..217217e 100644 --- a/OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs +++ b/OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs @@ -221,6 +221,7 @@ namespace OpenSim.Capabilities.Handlers int start, end; if (TryParseRange(range, out start, out end)) { + // Before clamping start make sure we can satisfy it in order to avoid // sending back the last byte instead of an error status if (start >= texture.Data.Length) @@ -266,9 +267,14 @@ namespace OpenSim.Capabilities.Handlers response.Body.Write(texture.Data, 0, texture.Data.Length); } -// m_log.DebugFormat( -// "[GETTEXTURE]: For texture {0} requested range {1} responded {2} with content length {3} (actual {4})", -// texture.FullID, range, response.StatusCode, response.ContentLength, texture.Data.Length); +// if (response.StatusCode < 200 || response.StatusCode > 299) +// m_log.WarnFormat( +// "[GETTEXTURE]: For texture {0} requested range {1} responded {2} with content length {3} (actual {4})", +// texture.FullID, range, response.StatusCode, response.ContentLength, texture.Data.Length); +// else +// m_log.DebugFormat( +// "[GETTEXTURE]: For texture {0} requested range {1} responded {2} with content length {3} (actual {4})", +// texture.FullID, range, response.StatusCode, response.ContentLength, texture.Data.Length); } private bool TryParseRange(string header, out int start, out int end) -- cgit v1.1