From ba91d4ba93103f82876e0f2563c34aa6e4767392 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Fri, 6 Jul 2012 01:06:48 +0100 Subject: Changed GetTexture error code RequestedRangeNotSatisfiable to NotFound, since viewers don't seem to handle that and keep retrying --- OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'OpenSim/Capabilities/Handlers/GetTexture') diff --git a/OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs b/OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs index 217217e..0797215 100644 --- a/OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs +++ b/OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs @@ -226,7 +226,9 @@ namespace OpenSim.Capabilities.Handlers // sending back the last byte instead of an error status if (start >= texture.Data.Length) { - response.StatusCode = (int)System.Net.HttpStatusCode.RequestedRangeNotSatisfiable; +// response.StatusCode = (int)System.Net.HttpStatusCode.RequestedRangeNotSatisfiable; + // viewers don't seem to handle RequestedRangeNotSatisfiable and keep retrying with same parameters + response.StatusCode = (int)System.Net.HttpStatusCode.NotFound; } else { -- cgit v1.1 From 387e59ff7f60f2b12526eaacd93581f76abe26e1 Mon Sep 17 00:00:00 2001 From: Melanie Date: Fri, 14 Sep 2012 21:24:25 +0200 Subject: Revamp the HTTP textures handler to allow a maximum of four fetches at any time and to drop requests for avatars n longer in the scene --- .../Handlers/GetTexture/GetTextureHandler.cs | 167 +++++++++------------ .../GetTexture/GetTextureServerConnector.cs | 6 +- .../GetTexture/Tests/GetTextureHandlerTests.cs | 4 +- 3 files changed, 80 insertions(+), 97 deletions(-) (limited to 'OpenSim/Capabilities/Handlers/GetTexture') diff --git a/OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs b/OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs index f040ff7..4e755aa 100644 --- a/OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs +++ b/OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs @@ -47,36 +47,36 @@ using Caps = OpenSim.Framework.Capabilities.Caps; namespace OpenSim.Capabilities.Handlers { - public class GetTextureHandler : BaseStreamHandler + public class GetTextureHandler { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + private IAssetService m_assetService; public const string DefaultFormat = "x-j2c"; - // TODO: Change this to a config option - const string REDIRECT_URL = null; - - public GetTextureHandler(string path, IAssetService assService, string name, string description) - : base("GET", path, name, description) + public GetTextureHandler(IAssetService assService) { m_assetService = assService; } - public override byte[] Handle(string path, Stream request, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) + public Hashtable Handle(Hashtable request) { - // Try to parse the texture ID from the request URL - NameValueCollection query = HttpUtility.ParseQueryString(httpRequest.Url.Query); - string textureStr = query.GetOne("texture_id"); - string format = query.GetOne("format"); + Hashtable ret = new Hashtable(); + ret["int_response_code"] = (int)System.Net.HttpStatusCode.NotFound; + ret["content_type"] = "text/plain"; + ret["keepalive"] = false; + ret["reusecontext"] = false; + + string textureStr = (string)request["texture_id"]; + string format = (string)request["format"]; //m_log.DebugFormat("[GETTEXTURE]: called {0}", textureStr); if (m_assetService == null) { m_log.Error("[GETTEXTURE]: Cannot fetch texture " + textureStr + " without an asset service"); - httpResponse.StatusCode = (int)System.Net.HttpStatusCode.NotFound; } UUID textureID; @@ -91,30 +91,30 @@ namespace OpenSim.Capabilities.Handlers } else { - formats = WebUtil.GetPreferredImageTypes(httpRequest.Headers.Get("Accept")); + formats = new string[1] { DefaultFormat }; // default + if (((Hashtable)request["headers"])["Accept"] != null) + formats = WebUtil.GetPreferredImageTypes((string)((Hashtable)request["headers"])["Accept"]); if (formats.Length == 0) formats = new string[1] { DefaultFormat }; // default } // OK, we have an array with preferred formats, possibly with only one entry - httpResponse.StatusCode = (int)System.Net.HttpStatusCode.NotFound; foreach (string f in formats) { - if (FetchTexture(httpRequest, httpResponse, textureID, f)) + if (FetchTexture(request, ret, textureID, f)) break; } } else { - m_log.Warn("[GETTEXTURE]: Failed to parse a texture_id from GetTexture request: " + httpRequest.Url); + m_log.Warn("[GETTEXTURE]: Failed to parse a texture_id from GetTexture request: " + (string)request["uri"]); } // m_log.DebugFormat( // "[GETTEXTURE]: For texture {0} sending back response {1}, data length {2}", // textureID, httpResponse.StatusCode, httpResponse.ContentLength); - - return null; + return ret; } /// @@ -125,7 +125,7 @@ namespace OpenSim.Capabilities.Handlers /// /// /// False for "caller try another codec"; true otherwise - private bool FetchTexture(IOSHttpRequest httpRequest, IOSHttpResponse httpResponse, UUID textureID, string format) + private bool FetchTexture(Hashtable request, Hashtable response, UUID textureID, string format) { // m_log.DebugFormat("[GETTEXTURE]: {0} with requested format {1}", textureID, format); AssetBase texture; @@ -134,84 +134,61 @@ namespace OpenSim.Capabilities.Handlers if (format != DefaultFormat) fullID = fullID + "-" + format; - if (!String.IsNullOrEmpty(REDIRECT_URL)) + // try the cache + texture = m_assetService.GetCached(fullID); + + if (texture == null) { - // Only try to fetch locally cached textures. Misses are redirected - texture = m_assetService.GetCached(fullID); + //m_log.DebugFormat("[GETTEXTURE]: texture was not in the cache"); + + // Fetch locally or remotely. Misses return a 404 + texture = m_assetService.Get(textureID.ToString()); if (texture != null) { if (texture.Type != (sbyte)AssetType.Texture) + return true; + + if (format == DefaultFormat) { - httpResponse.StatusCode = (int)System.Net.HttpStatusCode.NotFound; + WriteTextureData(request, response, texture, format); return true; } - WriteTextureData(httpRequest, httpResponse, texture, format); - } - else - { - string textureUrl = REDIRECT_URL + textureID.ToString(); - m_log.Debug("[GETTEXTURE]: Redirecting texture request to " + textureUrl); - httpResponse.RedirectLocation = textureUrl; - return true; - } - } - else // no redirect - { - // try the cache - texture = m_assetService.GetCached(fullID); - - if (texture == null) - { - //m_log.DebugFormat("[GETTEXTURE]: texture was not in the cache"); - - // Fetch locally or remotely. Misses return a 404 - texture = m_assetService.Get(textureID.ToString()); - - if (texture != null) + else { - if (texture.Type != (sbyte)AssetType.Texture) - { - httpResponse.StatusCode = (int)System.Net.HttpStatusCode.NotFound; - return true; - } - if (format == DefaultFormat) - { - WriteTextureData(httpRequest, httpResponse, texture, format); - return true; - } - else - { - AssetBase newTexture = new AssetBase(texture.ID + "-" + format, texture.Name, (sbyte)AssetType.Texture, texture.Metadata.CreatorID); - newTexture.Data = ConvertTextureData(texture, format); - if (newTexture.Data.Length == 0) - return false; // !!! Caller try another codec, please! - - newTexture.Flags = AssetFlags.Collectable; - newTexture.Temporary = true; - m_assetService.Store(newTexture); - WriteTextureData(httpRequest, httpResponse, newTexture, format); - return true; - } + AssetBase newTexture = new AssetBase(texture.ID + "-" + format, texture.Name, (sbyte)AssetType.Texture, texture.Metadata.CreatorID); + newTexture.Data = ConvertTextureData(texture, format); + if (newTexture.Data.Length == 0) + return false; // !!! Caller try another codec, please! + + newTexture.Flags = AssetFlags.Collectable; + newTexture.Temporary = true; + m_assetService.Store(newTexture); + WriteTextureData(request, response, newTexture, format); + return true; } - } - else // it was on the cache - { - //m_log.DebugFormat("[GETTEXTURE]: texture was in the cache"); - WriteTextureData(httpRequest, httpResponse, texture, format); - return true; - } - } + } + } + else // it was on the cache + { + //m_log.DebugFormat("[GETTEXTURE]: texture was in the cache"); + WriteTextureData(request, response, texture, format); + return true; + } // not found // m_log.Warn("[GETTEXTURE]: Texture " + textureID + " not found"); - httpResponse.StatusCode = (int)System.Net.HttpStatusCode.NotFound; return true; } - private void WriteTextureData(IOSHttpRequest request, IOSHttpResponse response, AssetBase texture, string format) + private void WriteTextureData(Hashtable request, Hashtable response, AssetBase texture, string format) { - string range = request.Headers.GetOne("Range"); + Hashtable headers = new Hashtable(); + response["headers"] = headers; + + string range = String.Empty; + if (((Hashtable)request["headers"])["Range"] != null) + range = (string)((Hashtable)request["headers"])["Range"]; if (!String.IsNullOrEmpty(range)) // JP2's only { @@ -226,7 +203,7 @@ namespace OpenSim.Capabilities.Handlers { // response.StatusCode = (int)System.Net.HttpStatusCode.RequestedRangeNotSatisfiable; // viewers don't seem to handle RequestedRangeNotSatisfiable and keep retrying with same parameters - response.StatusCode = (int)System.Net.HttpStatusCode.NotFound; + response["int_response_code"] = (int)System.Net.HttpStatusCode.NotFound; } else { @@ -240,31 +217,33 @@ namespace OpenSim.Capabilities.Handlers // We were accidentally sending back 404 before in this situation // https://issues.apache.org/bugzilla/show_bug.cgi?id=51878 supports sending 206 even if the // entire range is requested, and viewer 3.2.2 (and very probably earlier) seems fine with this. - response.StatusCode = (int)System.Net.HttpStatusCode.PartialContent; - - response.ContentLength = len; - response.ContentType = texture.Metadata.ContentType; - response.AddHeader("Content-Range", String.Format("bytes {0}-{1}/{2}", start, end, texture.Data.Length)); + response["int_response_code"] = (int)System.Net.HttpStatusCode.PartialContent; + response["content-type"] = texture.Metadata.ContentType; + headers["Content-Range"] = String.Format("bytes {0}-{1}/{2}", start, end, texture.Data.Length); - response.Body.Write(texture.Data, start, len); + byte[] d = new byte[len]; + Array.Copy(texture.Data, start, d, 0, len); + response["bin_response_data"] = d; +// response.Body.Write(texture.Data, start, len); } } else { m_log.Warn("[GETTEXTURE]: Malformed Range header: " + range); - response.StatusCode = (int)System.Net.HttpStatusCode.BadRequest; + response["int_response_code"] = (int)System.Net.HttpStatusCode.BadRequest; } } else // JP2's or other formats { // Full content request - response.StatusCode = (int)System.Net.HttpStatusCode.OK; - response.ContentLength = texture.Data.Length; + response["int_response_code"] = (int)System.Net.HttpStatusCode.OK; if (format == DefaultFormat) - response.ContentType = texture.Metadata.ContentType; + response["content_type"] = texture.Metadata.ContentType; else - response.ContentType = "image/" + format; - response.Body.Write(texture.Data, 0, texture.Data.Length); + response["content_type"] = "image/" + format; + + response["bin_response_data"] = texture.Data; +// response.Body.Write(texture.Data, 0, texture.Data.Length); } // if (response.StatusCode < 200 || response.StatusCode > 299) @@ -368,4 +347,4 @@ namespace OpenSim.Capabilities.Handlers return null; } } -} \ No newline at end of file +} diff --git a/OpenSim/Capabilities/Handlers/GetTexture/GetTextureServerConnector.cs b/OpenSim/Capabilities/Handlers/GetTexture/GetTextureServerConnector.cs index 71cf033..bf66acb 100644 --- a/OpenSim/Capabilities/Handlers/GetTexture/GetTextureServerConnector.cs +++ b/OpenSim/Capabilities/Handlers/GetTexture/GetTextureServerConnector.cs @@ -33,6 +33,7 @@ using OpenSim.Framework.Servers.HttpServer; using OpenSim.Server.Handlers.Base; using OpenMetaverse; +/* namespace OpenSim.Capabilities.Handlers { public class GetTextureServerConnector : ServiceConnector @@ -63,7 +64,8 @@ namespace OpenSim.Capabilities.Handlers throw new Exception(String.Format("Failed to load AssetService from {0}; config is {1}", assetService, m_ConfigName)); server.AddStreamHandler( - new GetTextureHandler("/CAPS/GetTexture/" /*+ UUID.Random() */, m_AssetService, "GetTexture", null)); + new GetTextureHandler("/CAPS/GetTexture/", m_AssetService, "GetTexture", null)); } } -} \ No newline at end of file +} +*/ diff --git a/OpenSim/Capabilities/Handlers/GetTexture/Tests/GetTextureHandlerTests.cs b/OpenSim/Capabilities/Handlers/GetTexture/Tests/GetTextureHandlerTests.cs index 761e4e7..b6ae41b 100644 --- a/OpenSim/Capabilities/Handlers/GetTexture/Tests/GetTextureHandlerTests.cs +++ b/OpenSim/Capabilities/Handlers/GetTexture/Tests/GetTextureHandlerTests.cs @@ -39,6 +39,7 @@ using OpenSim.Region.Framework.Scenes; using OpenSim.Tests.Common; using OpenSim.Tests.Common.Mock; +/* namespace OpenSim.Capabilities.Handlers.GetTexture.Tests { [TestFixture] @@ -60,4 +61,5 @@ namespace OpenSim.Capabilities.Handlers.GetTexture.Tests Assert.That(resp.StatusCode, Is.EqualTo((int)System.Net.HttpStatusCode.NotFound)); } } -} \ No newline at end of file +} +*/ -- cgit v1.1 From 9a042696440e7dd9502f78b80ae8441642912dd3 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Wed, 26 Sep 2012 16:49:39 +0100 Subject: fix GetTextureHandler range --- OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'OpenSim/Capabilities/Handlers/GetTexture') diff --git a/OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs b/OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs index 4e755aa..0df16d6 100644 --- a/OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs +++ b/OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs @@ -187,7 +187,11 @@ namespace OpenSim.Capabilities.Handlers response["headers"] = headers; string range = String.Empty; - if (((Hashtable)request["headers"])["Range"] != null) + + if (((Hashtable)request["headers"])["range"] != null) + range = (string)((Hashtable)request["headers"])["range"]; + + else if (((Hashtable)request["headers"])["Range"] != null) range = (string)((Hashtable)request["headers"])["Range"]; if (!String.IsNullOrEmpty(range)) // JP2's only -- cgit v1.1 From a70352db17a26eb01fea30eb6a7d6159d52a4916 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Wed, 26 Sep 2012 21:03:31 +0100 Subject: don't send a partial contents report if we are sending all data --- .../Handlers/GetTexture/GetTextureHandler.cs | 25 +++++++++++++--------- 1 file changed, 15 insertions(+), 10 deletions(-) (limited to 'OpenSim/Capabilities/Handlers/GetTexture') diff --git a/OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs b/OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs index 0df16d6..b3a4d61 100644 --- a/OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs +++ b/OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs @@ -217,17 +217,22 @@ namespace OpenSim.Capabilities.Handlers //m_log.Debug("Serving " + start + " to " + end + " of " + texture.Data.Length + " bytes for texture " + texture.ID); - // Always return PartialContent, even if the range covered the entire data length - // We were accidentally sending back 404 before in this situation - // https://issues.apache.org/bugzilla/show_bug.cgi?id=51878 supports sending 206 even if the - // entire range is requested, and viewer 3.2.2 (and very probably earlier) seems fine with this. - response["int_response_code"] = (int)System.Net.HttpStatusCode.PartialContent; response["content-type"] = texture.Metadata.ContentType; - headers["Content-Range"] = String.Format("bytes {0}-{1}/{2}", start, end, texture.Data.Length); - - byte[] d = new byte[len]; - Array.Copy(texture.Data, start, d, 0, len); - response["bin_response_data"] = d; + + if (start == 0 && len == texture.Data.Length) // well redudante maybe + { + response["int_response_code"] = (int)System.Net.HttpStatusCode.OK; + response["bin_response_data"] = texture.Data; + } + else + { + response["int_response_code"] = (int)System.Net.HttpStatusCode.PartialContent; + headers["Content-Range"] = String.Format("bytes {0}-{1}/{2}", start, end, texture.Data.Length); + + byte[] d = new byte[len]; + Array.Copy(texture.Data, start, d, 0, len); + response["bin_response_data"] = d; + } // response.Body.Write(texture.Data, start, len); } } -- cgit v1.1 From b7b96a5e4f1e26341742e35e5253e6e14797bd15 Mon Sep 17 00:00:00 2001 From: teravus Date: Mon, 5 Nov 2012 13:10:00 -0500 Subject: Another step in the chain. Pipe the throttle update to the appropriate PollServiceTextureEventArgs. Each poll service having it's own throttle member is more consistent with the model then the region module keeping track of all of them globally and better for locking too. The Poll Services object is not set static to handle multiple nearby regions on the same simulator. Next step is hooking it up to HasEvents --- OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'OpenSim/Capabilities/Handlers/GetTexture') 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 ret["content_type"] = "text/plain"; ret["keepalive"] = false; ret["reusecontext"] = false; - + ret["int_bytes"] = 0; string textureStr = (string)request["texture_id"]; string format = (string)request["format"]; @@ -223,6 +223,7 @@ namespace OpenSim.Capabilities.Handlers { response["int_response_code"] = (int)System.Net.HttpStatusCode.OK; response["bin_response_data"] = texture.Data; + response["int_bytes"] = texture.Data.Length; } else { @@ -232,6 +233,7 @@ namespace OpenSim.Capabilities.Handlers byte[] d = new byte[len]; Array.Copy(texture.Data, start, d, 0, len); response["bin_response_data"] = d; + response["int_bytes"] = len; } // response.Body.Write(texture.Data, start, len); } @@ -252,6 +254,8 @@ namespace OpenSim.Capabilities.Handlers response["content_type"] = "image/" + format; response["bin_response_data"] = texture.Data; + response["int_bytes"] = texture.Data.Length; + // response.Body.Write(texture.Data, 0, texture.Data.Length); } -- cgit v1.1 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/Handlers/GetTexture') 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/Handlers/GetTexture') 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 From 05d72f77ff38585817dead9b4a812ff97a001dce Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Tue, 18 Aug 2015 21:32:03 +0100 Subject: do keepalive on mesh and texture GET. Dont use reusecontext any where. setting of keepalive is wrong, it should follow the requested one ( or always as http1.1) only deny if needed (errors). KeepAlive may increase stress on number of avaiable file descritors. --- OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'OpenSim/Capabilities/Handlers/GetTexture') diff --git a/OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs b/OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs index f3efb53..0e0cb39 100644 --- a/OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs +++ b/OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs @@ -66,7 +66,7 @@ namespace OpenSim.Capabilities.Handlers Hashtable ret = new Hashtable(); ret["int_response_code"] = (int)System.Net.HttpStatusCode.NotFound; ret["content_type"] = "text/plain"; - ret["keepalive"] = false; + ret["keepalive"] = true; ret["reusecontext"] = false; ret["int_bytes"] = 0; string textureStr = (string)request["texture_id"]; @@ -112,7 +112,7 @@ namespace OpenSim.Capabilities.Handlers ret["error_status_text"] = "not found"; ret["str_response_string"] = "not found"; ret["content_type"] = "text/plain"; - ret["keepalive"] = false; + ret["keepalive"] = true; ret["reusecontext"] = false; ret["int_bytes"] = 0; } -- cgit v1.1 From 018d855f2840988163519ca941a373c77997c689 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Mon, 24 Aug 2015 07:38:33 +0100 Subject: turn off KeepAlive --- OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'OpenSim/Capabilities/Handlers/GetTexture') diff --git a/OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs b/OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs index 0e0cb39..f3efb53 100644 --- a/OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs +++ b/OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs @@ -66,7 +66,7 @@ namespace OpenSim.Capabilities.Handlers Hashtable ret = new Hashtable(); ret["int_response_code"] = (int)System.Net.HttpStatusCode.NotFound; ret["content_type"] = "text/plain"; - ret["keepalive"] = true; + ret["keepalive"] = false; ret["reusecontext"] = false; ret["int_bytes"] = 0; string textureStr = (string)request["texture_id"]; @@ -112,7 +112,7 @@ namespace OpenSim.Capabilities.Handlers ret["error_status_text"] = "not found"; ret["str_response_string"] = "not found"; ret["content_type"] = "text/plain"; - ret["keepalive"] = true; + ret["keepalive"] = false; ret["reusecontext"] = false; ret["int_bytes"] = 0; } -- cgit v1.1