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')
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 245763b1b08d667aede3be7c092fa4c7200549c0 Mon Sep 17 00:00:00 2001
From: UbitUmarov
Date: Tue, 11 Sep 2012 20:30:30 +0100
Subject: let LLSDAssetUploadRequest include asset_resources information plus
let NewAgentInventoryRequest know about mesh (does nothing with it still)
---
OpenSim/Capabilities/LLSDAssetUploadRequest.cs | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
(limited to 'OpenSim/Capabilities')
diff --git a/OpenSim/Capabilities/LLSDAssetUploadRequest.cs b/OpenSim/Capabilities/LLSDAssetUploadRequest.cs
index 6e66f0a..f981bf0 100644
--- a/OpenSim/Capabilities/LLSDAssetUploadRequest.cs
+++ b/OpenSim/Capabilities/LLSDAssetUploadRequest.cs
@@ -31,6 +31,15 @@ using OpenMetaverse;
namespace OpenSim.Framework.Capabilities
{
[OSDMap]
+ public class LLSDAssetResource
+ {
+ public OSDArray instance_list = new OSDArray();
+ public OSDArray texture_list = new OSDArray();
+ public OSDArray mesh_list = new OSDArray();
+ public string metric = String.Empty;
+ }
+
+ [OSDMap]
public class LLSDAssetUploadRequest
{
public string asset_type = String.Empty;
@@ -38,7 +47,7 @@ namespace OpenSim.Framework.Capabilities
public UUID folder_id = UUID.Zero;
public string inventory_type = String.Empty;
public string name = String.Empty;
-
+ public LLSDAssetResource asset_resources = new LLSDAssetResource();
public LLSDAssetUploadRequest()
{
}
--
cgit v1.1
From 013e94af5d45a7c99e46e01d9c5965a79ac1b231 Mon Sep 17 00:00:00 2001
From: UbitUmarov
Date: Tue, 11 Sep 2012 23:06:29 +0100
Subject: report mesh upload costs ( fake values)
---
OpenSim/Capabilities/LLSDAssetUploadResponse.cs | 23 ++++++++++++++++++++++-
1 file changed, 22 insertions(+), 1 deletion(-)
(limited to 'OpenSim/Capabilities')
diff --git a/OpenSim/Capabilities/LLSDAssetUploadResponse.cs b/OpenSim/Capabilities/LLSDAssetUploadResponse.cs
index 0d6f7f9..18285b5 100644
--- a/OpenSim/Capabilities/LLSDAssetUploadResponse.cs
+++ b/OpenSim/Capabilities/LLSDAssetUploadResponse.cs
@@ -30,11 +30,32 @@ using System;
namespace OpenSim.Framework.Capabilities
{
[OSDMap]
+ public class LLSDAssetUploadResponsePricebrkDown
+ {
+ public int mesh_streaming;
+ public int mesh_physics;
+ public int mesh_instance;
+ public int texture;
+ public int model;
+ }
+
+ [OSDMap]
+ public class LLSDAssetUploadResponseData
+ {
+ public double resource_cost;
+ public double model_streaming_cost;
+ public double simulation_cost;
+ public double physics_cost;
+ public LLSDAssetUploadResponsePricebrkDown upload_price_breakdown = new LLSDAssetUploadResponsePricebrkDown();
+ }
+
+ [OSDMap]
public class LLSDAssetUploadResponse
{
public string uploader = String.Empty;
public string state = String.Empty;
-
+ public int upload_price = 0;
+ public LLSDAssetUploadResponseData data = null;
public LLSDAssetUploadResponse()
{
}
--
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')
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 4bba72b7afc104ea5a42acb6206c1c07fbba099b Mon Sep 17 00:00:00 2001
From: UbitUmarov
Date: Sat, 22 Sep 2012 16:47:15 +0100
Subject: removed AssetUploaderWithCost, fixing AssetUploader. add parsing of
some more needed fields in request
---
OpenSim/Capabilities/LLSDAssetUploadRequest.cs | 4 ++++
1 file changed, 4 insertions(+)
(limited to 'OpenSim/Capabilities')
diff --git a/OpenSim/Capabilities/LLSDAssetUploadRequest.cs b/OpenSim/Capabilities/LLSDAssetUploadRequest.cs
index f981bf0..6779cc1 100644
--- a/OpenSim/Capabilities/LLSDAssetUploadRequest.cs
+++ b/OpenSim/Capabilities/LLSDAssetUploadRequest.cs
@@ -45,6 +45,10 @@ namespace OpenSim.Framework.Capabilities
public string asset_type = String.Empty;
public string description = String.Empty;
public UUID folder_id = UUID.Zero;
+ public UUID texture_folder_id = UUID.Zero;
+ public int next_owner_mask = 0;
+ public int group_mask = 0;
+ public int everyone_mask = 0;
public string inventory_type = String.Empty;
public string name = String.Empty;
public LLSDAssetResource asset_resources = new LLSDAssetResource();
--
cgit v1.1
From 11e05217df2de7ce7da581a2332ee4871f75a527 Mon Sep 17 00:00:00 2001
From: UbitUmarov
Date: Sat, 22 Sep 2012 21:14:15 +0100
Subject: report asset upload errors the right away
---
OpenSim/Capabilities/LLSDAssetUploadComplete.cs | 2 ++
OpenSim/Capabilities/LLSDAssetUploadResponse.cs | 10 ++++++++++
2 files changed, 12 insertions(+)
(limited to 'OpenSim/Capabilities')
diff --git a/OpenSim/Capabilities/LLSDAssetUploadComplete.cs b/OpenSim/Capabilities/LLSDAssetUploadComplete.cs
index ab6cee5..596a556 100644
--- a/OpenSim/Capabilities/LLSDAssetUploadComplete.cs
+++ b/OpenSim/Capabilities/LLSDAssetUploadComplete.cs
@@ -30,12 +30,14 @@ using OpenMetaverse;
namespace OpenSim.Framework.Capabilities
{
+
[LLSDType("MAP")]
public class LLSDAssetUploadComplete
{
public string new_asset = String.Empty;
public UUID new_inventory_item = UUID.Zero;
public string state = String.Empty;
+ public LLSDAssetUploadError error = null;
//public bool success = false;
public LLSDAssetUploadComplete()
diff --git a/OpenSim/Capabilities/LLSDAssetUploadResponse.cs b/OpenSim/Capabilities/LLSDAssetUploadResponse.cs
index 18285b5..7c4bc97 100644
--- a/OpenSim/Capabilities/LLSDAssetUploadResponse.cs
+++ b/OpenSim/Capabilities/LLSDAssetUploadResponse.cs
@@ -26,10 +26,18 @@
*/
using System;
+using OpenMetaverse;
namespace OpenSim.Framework.Capabilities
{
[OSDMap]
+ public class LLSDAssetUploadError
+ {
+ public string message = String.Empty;
+ public UUID identifier = UUID.Zero;
+ }
+
+ [OSDMap]
public class LLSDAssetUploadResponsePricebrkDown
{
public int mesh_streaming;
@@ -56,11 +64,13 @@ namespace OpenSim.Framework.Capabilities
public string state = String.Empty;
public int upload_price = 0;
public LLSDAssetUploadResponseData data = null;
+ public LLSDAssetUploadError error = null;
public LLSDAssetUploadResponse()
{
}
}
+
[OSDMap]
public class LLSDNewFileAngentInventoryVariablePriceReplyResponse
{
--
cgit v1.1
From 64db9e41143c36ee1638f2c453b4645ff4ed008f Mon Sep 17 00:00:00 2001
From: UbitUmarov
Date: Sun, 23 Sep 2012 15:04:10 +0100
Subject: try to allow free uploads for testing, if users prefix names with
"TEST-". Let textures get into inventory again. Both features under config
control. Have direct warnings to client, including a final one on upload
complete since i see nothing. problems: textures don't showup in inventory
til relog, also issues with permitions. A few more changes
---
OpenSim/Capabilities/LLSDAssetUploadComplete.cs | 1 +
1 file changed, 1 insertion(+)
(limited to 'OpenSim/Capabilities')
diff --git a/OpenSim/Capabilities/LLSDAssetUploadComplete.cs b/OpenSim/Capabilities/LLSDAssetUploadComplete.cs
index 596a556..ae8eb09 100644
--- a/OpenSim/Capabilities/LLSDAssetUploadComplete.cs
+++ b/OpenSim/Capabilities/LLSDAssetUploadComplete.cs
@@ -36,6 +36,7 @@ namespace OpenSim.Framework.Capabilities
{
public string new_asset = String.Empty;
public UUID new_inventory_item = UUID.Zero;
+// public UUID new_texture_folder_id = UUID.Zero;
public string state = String.Empty;
public LLSDAssetUploadError error = null;
//public bool success = false;
--
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')
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')
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')
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 cda127e30f0049cda21137363e4d759fd7fd4959 Mon Sep 17 00:00:00 2001
From: teravus
Date: Fri, 9 Nov 2012 23:55:30 -0500
Subject: * Prep work switching the GetMeshModule over to a poll service. *
This still has the image throttler in it.. as is... so it's not suitable
for live yet.... The throttler keeps track of the task throttle but doesn't
balance the UDP throttle yet.
---
.../Handlers/GetMesh/GetMeshHandler.cs | 131 ++++++++++++++++++++-
1 file changed, 126 insertions(+), 5 deletions(-)
(limited to 'OpenSim/Capabilities')
diff --git a/OpenSim/Capabilities/Handlers/GetMesh/GetMeshHandler.cs b/OpenSim/Capabilities/Handlers/GetMesh/GetMeshHandler.cs
index 720640e..d29bed9 100644
--- a/OpenSim/Capabilities/Handlers/GetMesh/GetMeshHandler.cs
+++ b/OpenSim/Capabilities/Handlers/GetMesh/GetMeshHandler.cs
@@ -45,16 +45,53 @@ namespace OpenSim.Capabilities.Handlers
{
public class GetMeshHandler
{
-// private static readonly ILog m_log =
-// LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
+ private static readonly ILog m_log =
+ LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private IAssetService m_assetService;
+ public const string DefaultFormat = "vnd.ll.mesh";
+
public GetMeshHandler(IAssetService assService)
{
m_assetService = assService;
}
+ public Hashtable Handle(Hashtable request)
+ {
+ Hashtable ret = new Hashtable();
+ ret["int_response_code"] = (int)System.Net.HttpStatusCode.NotFound;
+ ret["content_type"] = "text/plain";
+ ret["keepalive"] = false;
+ ret["reusecontext"] = false;
+ ret["int_bytes"] = 0;
+ string MeshStr = (string)request["mesh_id"];
+
+
+ //m_log.DebugFormat("[GETMESH]: called {0}", MeshStr);
+
+ if (m_assetService == null)
+ {
+ m_log.Error("[GETMESH]: Cannot fetch mesh " + MeshStr + " without an asset service");
+ }
+
+ UUID meshID;
+ if (!String.IsNullOrEmpty(MeshStr) && UUID.TryParse(MeshStr, out meshID))
+ {
+ // m_log.DebugFormat("[GETMESH]: Received request for mesh id {0}", meshID);
+
+ ret = ProcessGetMesh(request, UUID.Zero, null);
+
+
+ }
+ else
+ {
+ m_log.Warn("[GETMESH]: Failed to parse a mesh_id from GetMesh request: " + (string)request["uri"]);
+ }
+
+
+ return ret;
+ }
public Hashtable ProcessGetMesh(Hashtable request, UUID AgentId, Caps cap)
{
Hashtable responsedata = new Hashtable();
@@ -86,9 +123,78 @@ namespace OpenSim.Capabilities.Handlers
{
if (mesh.Type == (SByte)AssetType.Mesh)
{
- responsedata["str_response_string"] = Convert.ToBase64String(mesh.Data);
- responsedata["content_type"] = "application/vnd.ll.mesh";
- responsedata["int_response_code"] = 200;
+
+ Hashtable headers = new Hashtable();
+ responsedata["headers"] = headers;
+
+ string range = String.Empty;
+
+ 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)) // Mesh Asset LOD // Physics
+ {
+ // Range request
+ 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 >= mesh.Data.Length)
+ {
+ responsedata["int_response_code"] = 404; //501; //410; //404;
+ responsedata["content_type"] = "text/plain";
+ responsedata["keepalive"] = false;
+ responsedata["str_response_string"] = "This range doesnt exist.";
+ return responsedata;
+ }
+ else
+ {
+ end = Utils.Clamp(end, 0, mesh.Data.Length - 1);
+ start = Utils.Clamp(start, 0, end);
+ int len = end - start + 1;
+
+ //m_log.Debug("Serving " + start + " to " + end + " of " + texture.Data.Length + " bytes for texture " + texture.ID);
+
+
+
+ if (start == 0 && len == mesh.Data.Length) // well redudante maybe
+ {
+ responsedata["int_response_code"] = (int) System.Net.HttpStatusCode.OK;
+ responsedata["bin_response_data"] = mesh.Data;
+ responsedata["int_bytes"] = mesh.Data.Length;
+ }
+ else
+ {
+ responsedata["int_response_code"] =
+ (int) System.Net.HttpStatusCode.PartialContent;
+ headers["Content-Range"] = String.Format("bytes {0}-{1}/{2}", start, end,
+ mesh.Data.Length);
+
+ byte[] d = new byte[len];
+ Array.Copy(mesh.Data, start, d, 0, len);
+ responsedata["bin_response_data"] = d;
+ responsedata["int_bytes"] = len;
+ }
+ }
+ }
+ else
+ {
+ m_log.Warn("[GETMESH]: Failed to parse a range from GetMesh request, sending full asset: " + (string)request["uri"]);
+ responsedata["str_response_string"] = Convert.ToBase64String(mesh.Data);
+ responsedata["content_type"] = "application/vnd.ll.mesh";
+ responsedata["int_response_code"] = 200;
+ }
+ }
+ else
+ {
+ responsedata["str_response_string"] = Convert.ToBase64String(mesh.Data);
+ responsedata["content_type"] = "application/vnd.ll.mesh";
+ responsedata["int_response_code"] = 200;
+ }
}
// Optionally add additional mesh types here
else
@@ -112,5 +218,20 @@ namespace OpenSim.Capabilities.Handlers
return responsedata;
}
+ private bool TryParseRange(string header, out int start, out int end)
+ {
+ if (header.StartsWith("bytes="))
+ {
+ string[] rangeValues = header.Substring(6).Split('-');
+ if (rangeValues.Length == 2)
+ {
+ if (Int32.TryParse(rangeValues[0], out start) && Int32.TryParse(rangeValues[1], out end))
+ return true;
+ }
+ }
+
+ start = end = 0;
+ return false;
+ }
}
}
\ No newline at end of file
--
cgit v1.1
From 619c39e5144f15aca129d6d999bcc5c34133ee64 Mon Sep 17 00:00:00 2001
From: teravus
Date: Thu, 15 Nov 2012 09:44:02 -0500
Subject: * Fixes mesh loading issues in last commit.
---
OpenSim/Capabilities/Handlers/GetMesh/GetMeshHandler.cs | 9 +++++++++
1 file changed, 9 insertions(+)
(limited to 'OpenSim/Capabilities')
diff --git a/OpenSim/Capabilities/Handlers/GetMesh/GetMeshHandler.cs b/OpenSim/Capabilities/Handlers/GetMesh/GetMeshHandler.cs
index d29bed9..da59294 100644
--- a/OpenSim/Capabilities/Handlers/GetMesh/GetMeshHandler.cs
+++ b/OpenSim/Capabilities/Handlers/GetMesh/GetMeshHandler.cs
@@ -99,6 +99,7 @@ namespace OpenSim.Capabilities.Handlers
responsedata["content_type"] = "text/plain";
responsedata["keepalive"] = false;
responsedata["str_response_string"] = "Request wasn't what was expected";
+ responsedata["reusecontext"] = false;
string meshStr = string.Empty;
@@ -114,6 +115,7 @@ namespace OpenSim.Capabilities.Handlers
responsedata["content_type"] = "text/plain";
responsedata["keepalive"] = false;
responsedata["str_response_string"] = "The asset service is unavailable. So is your mesh.";
+ responsedata["reusecontext"] = false;
return responsedata;
}
@@ -149,6 +151,7 @@ namespace OpenSim.Capabilities.Handlers
responsedata["content_type"] = "text/plain";
responsedata["keepalive"] = false;
responsedata["str_response_string"] = "This range doesnt exist.";
+ responsedata["reusecontext"] = false;
return responsedata;
}
else
@@ -166,6 +169,7 @@ namespace OpenSim.Capabilities.Handlers
responsedata["int_response_code"] = (int) System.Net.HttpStatusCode.OK;
responsedata["bin_response_data"] = mesh.Data;
responsedata["int_bytes"] = mesh.Data.Length;
+ responsedata["reusecontext"] = false;
}
else
{
@@ -178,6 +182,7 @@ namespace OpenSim.Capabilities.Handlers
Array.Copy(mesh.Data, start, d, 0, len);
responsedata["bin_response_data"] = d;
responsedata["int_bytes"] = len;
+ responsedata["reusecontext"] = false;
}
}
}
@@ -187,6 +192,7 @@ namespace OpenSim.Capabilities.Handlers
responsedata["str_response_string"] = Convert.ToBase64String(mesh.Data);
responsedata["content_type"] = "application/vnd.ll.mesh";
responsedata["int_response_code"] = 200;
+ responsedata["reusecontext"] = false;
}
}
else
@@ -194,6 +200,7 @@ namespace OpenSim.Capabilities.Handlers
responsedata["str_response_string"] = Convert.ToBase64String(mesh.Data);
responsedata["content_type"] = "application/vnd.ll.mesh";
responsedata["int_response_code"] = 200;
+ responsedata["reusecontext"] = false;
}
}
// Optionally add additional mesh types here
@@ -203,6 +210,7 @@ namespace OpenSim.Capabilities.Handlers
responsedata["content_type"] = "text/plain";
responsedata["keepalive"] = false;
responsedata["str_response_string"] = "Unfortunately, this asset isn't a mesh.";
+ responsedata["reusecontext"] = false;
return responsedata;
}
}
@@ -212,6 +220,7 @@ namespace OpenSim.Capabilities.Handlers
responsedata["content_type"] = "text/plain";
responsedata["keepalive"] = false;
responsedata["str_response_string"] = "Your Mesh wasn't found. Sorry!";
+ responsedata["reusecontext"] = false;
return responsedata;
}
}
--
cgit v1.1
From e9153e1d1aae50024d8cd05fe14a9bce34343a0e Mon Sep 17 00:00:00 2001
From: teravus
Date: Thu, 15 Nov 2012 10:05:16 -0500
Subject: Revert "Merge master into teravuswork", it should have been
avination, not master.
This reverts commit dfac269032300872c4d0dc507f4f9062d102b0f4, reversing
changes made to 619c39e5144f15aca129d6d999bcc5c34133ee64.
---
.../Handlers/GetTexture/GetTextureHandler.cs | 18 ++----------------
1 file changed, 2 insertions(+), 16 deletions(-)
(limited to 'OpenSim/Capabilities')
diff --git a/OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs b/OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs
index 6437d0b..86e7aa0 100644
--- a/OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs
+++ b/OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs
@@ -200,25 +200,11 @@ 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)
{
-// m_log.DebugFormat(
-// "[GETTEXTURE]: Client requested range for texture {0} starting at {1} but texture has end of {2}",
-// texture.ID, start, texture.Data.Length);
-
- // Stricly speaking, as per http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html, we should be sending back
- // Requested Range Not Satisfiable (416) here. However, it appears that at least recent implementations
- // of the Linden Lab viewer (3.2.1 and 3.3.4 and probably earlier), a viewer that has previously
- // received a very small texture may attempt to fetch bytes from the server past the
- // range of data that it received originally. Whether this happens appears to depend on whether
- // the viewer's estimation of how large a request it needs to make for certain discard levels
- // (http://wiki.secondlife.com/wiki/Image_System#Discard_Level_and_Mip_Mapping), chiefly discard
- // level 2. If this estimate is greater than the total texture size, returning a RequestedRangeNotSatisfiable
- // here will cause the viewer to treat the texture as bad and never display the full resolution
- // However, if we return PartialContent (or OK) instead, the viewer will display that resolution.
-
// response.StatusCode = (int)System.Net.HttpStatusCode.RequestedRangeNotSatisfiable;
// viewers don't seem to handle RequestedRangeNotSatisfiable and keep retrying with same parameters
response["int_response_code"] = (int)System.Net.HttpStatusCode.NotFound;
@@ -229,7 +215,7 @@ namespace OpenSim.Capabilities.Handlers
start = Utils.Clamp(start, 0, end);
int len = end - start + 1;
-// m_log.Debug("Serving " + start + " to " + end + " of " + texture.Data.Length + " bytes for texture " + texture.ID);
+ //m_log.Debug("Serving " + start + " to " + end + " of " + texture.Data.Length + " bytes for texture " + texture.ID);
response["content-type"] = texture.Metadata.ContentType;
--
cgit v1.1
From 5e0294815f7e3ec83b7e568e1468948ac0ff7331 Mon Sep 17 00:00:00 2001
From: teravus
Date: Sat, 17 Nov 2012 03:47:09 -0500
Subject: * Plumbing and basic setting of the GetMesh Cap Throttler. * Last
step is to flip the throttle distribution.
---
.../Capabilities/Handlers/GetMesh/GetMeshHandler.cs | 21 ++++++++++++++++++++-
1 file changed, 20 insertions(+), 1 deletion(-)
(limited to 'OpenSim/Capabilities')
diff --git a/OpenSim/Capabilities/Handlers/GetMesh/GetMeshHandler.cs b/OpenSim/Capabilities/Handlers/GetMesh/GetMeshHandler.cs
index da59294..380705f 100644
--- a/OpenSim/Capabilities/Handlers/GetMesh/GetMeshHandler.cs
+++ b/OpenSim/Capabilities/Handlers/GetMesh/GetMeshHandler.cs
@@ -152,6 +152,7 @@ namespace OpenSim.Capabilities.Handlers
responsedata["keepalive"] = false;
responsedata["str_response_string"] = "This range doesnt exist.";
responsedata["reusecontext"] = false;
+ responsedata["int_lod"] = 3;
return responsedata;
}
else
@@ -162,14 +163,28 @@ namespace OpenSim.Capabilities.Handlers
//m_log.Debug("Serving " + start + " to " + end + " of " + texture.Data.Length + " bytes for texture " + texture.ID);
-
+ if (start > 20000)
+ {
+ responsedata["int_lod"] = 3;
+ }
+ else if (start < 4097)
+ {
+ responsedata["int_lod"] = 1;
+ }
+ else
+ {
+ responsedata["int_lod"] = 2;
+ }
+
if (start == 0 && len == mesh.Data.Length) // well redudante maybe
{
responsedata["int_response_code"] = (int) System.Net.HttpStatusCode.OK;
responsedata["bin_response_data"] = mesh.Data;
responsedata["int_bytes"] = mesh.Data.Length;
responsedata["reusecontext"] = false;
+ responsedata["int_lod"] = 3;
+
}
else
{
@@ -193,6 +208,7 @@ namespace OpenSim.Capabilities.Handlers
responsedata["content_type"] = "application/vnd.ll.mesh";
responsedata["int_response_code"] = 200;
responsedata["reusecontext"] = false;
+ responsedata["int_lod"] = 3;
}
}
else
@@ -201,6 +217,7 @@ namespace OpenSim.Capabilities.Handlers
responsedata["content_type"] = "application/vnd.ll.mesh";
responsedata["int_response_code"] = 200;
responsedata["reusecontext"] = false;
+ responsedata["int_lod"] = 3;
}
}
// Optionally add additional mesh types here
@@ -211,6 +228,7 @@ namespace OpenSim.Capabilities.Handlers
responsedata["keepalive"] = false;
responsedata["str_response_string"] = "Unfortunately, this asset isn't a mesh.";
responsedata["reusecontext"] = false;
+ responsedata["int_lod"] = 1;
return responsedata;
}
}
@@ -221,6 +239,7 @@ namespace OpenSim.Capabilities.Handlers
responsedata["keepalive"] = false;
responsedata["str_response_string"] = "Your Mesh wasn't found. Sorry!";
responsedata["reusecontext"] = false;
+ responsedata["int_lod"] = 0;
return responsedata;
}
}
--
cgit v1.1
From a118001181adfe27b5d0cc715e9f8c949673a9ef Mon Sep 17 00:00:00 2001
From: teravus
Date: Sat, 24 Nov 2012 22:01:34 -0500
Subject: * Fix a null ref error in
/..../OpenSim/Region/ClientStack/Linden/Caps/GetMeshModule.cs:339
---
OpenSim/Capabilities/Handlers/GetMesh/GetMeshHandler.cs | 3 +++
1 file changed, 3 insertions(+)
(limited to 'OpenSim/Capabilities')
diff --git a/OpenSim/Capabilities/Handlers/GetMesh/GetMeshHandler.cs b/OpenSim/Capabilities/Handlers/GetMesh/GetMeshHandler.cs
index 380705f..ec574a3 100644
--- a/OpenSim/Capabilities/Handlers/GetMesh/GetMeshHandler.cs
+++ b/OpenSim/Capabilities/Handlers/GetMesh/GetMeshHandler.cs
@@ -64,6 +64,7 @@ namespace OpenSim.Capabilities.Handlers
ret["keepalive"] = false;
ret["reusecontext"] = false;
ret["int_bytes"] = 0;
+ ret["int_lod"] = 0;
string MeshStr = (string)request["mesh_id"];
@@ -100,6 +101,8 @@ namespace OpenSim.Capabilities.Handlers
responsedata["keepalive"] = false;
responsedata["str_response_string"] = "Request wasn't what was expected";
responsedata["reusecontext"] = false;
+ responsedata["int_lod"] = 0;
+ responsedata["int_bytes"] = 0;
string meshStr = string.Empty;
--
cgit v1.1
From 77cc7ce399d1b1a710f3b3f4337932febdef66c8 Mon Sep 17 00:00:00 2001
From: teravus
Date: Fri, 21 Dec 2012 19:12:30 -0500
Subject: * Partial Commit for Avatar Appearance to include the functionality
of Cached Bakes.
---
.../Handlers/UploadBakedTexture/UploadBakedTextureHandler.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'OpenSim/Capabilities')
diff --git a/OpenSim/Capabilities/Handlers/UploadBakedTexture/UploadBakedTextureHandler.cs b/OpenSim/Capabilities/Handlers/UploadBakedTexture/UploadBakedTextureHandler.cs
index 8849a59..4fa604f 100644
--- a/OpenSim/Capabilities/Handlers/UploadBakedTexture/UploadBakedTextureHandler.cs
+++ b/OpenSim/Capabilities/Handlers/UploadBakedTexture/UploadBakedTextureHandler.cs
@@ -117,7 +117,7 @@ namespace OpenSim.Capabilities.Handlers
///
private void BakedTextureUploaded(UUID assetID, byte[] data)
{
-// m_log.DebugFormat("[UPLOAD BAKED TEXTURE HANDLER]: Received baked texture {0}", assetID.ToString());
+ m_log.DebugFormat("[UPLOAD BAKED TEXTURE HANDLER]: Received baked texture {0}", assetID.ToString());
AssetBase asset;
asset = new AssetBase(assetID, "Baked Texture", (sbyte)AssetType.Texture, m_HostCapsObj.AgentID.ToString());
--
cgit v1.1
From 6797ac14741851efa5ba60a00891e18cf7755c80 Mon Sep 17 00:00:00 2001
From: teravus
Date: Sat, 29 Dec 2012 08:53:58 -0500
Subject: * This finishes the implementation of AgentCachedTexture. Requires
the XBakes Module and service for full functionality. Previous no-cache
functionality works without the service and module. In some ways, I would
have been happier not putting an AssetBase in WearableCacheItem.. but
turns out it was probably unavoidable. No additional locks, yay.
---
.../UploadBakedTexture/UploadBakedTextureHandler.cs | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
(limited to 'OpenSim/Capabilities')
diff --git a/OpenSim/Capabilities/Handlers/UploadBakedTexture/UploadBakedTextureHandler.cs b/OpenSim/Capabilities/Handlers/UploadBakedTexture/UploadBakedTextureHandler.cs
index 4fa604f..5536564 100644
--- a/OpenSim/Capabilities/Handlers/UploadBakedTexture/UploadBakedTextureHandler.cs
+++ b/OpenSim/Capabilities/Handlers/UploadBakedTexture/UploadBakedTextureHandler.cs
@@ -27,6 +27,7 @@
using System;
using System.Collections;
+using System.Collections.Generic;
using System.Collections.Specialized;
using System.Drawing;
using System.Drawing.Imaging;
@@ -50,6 +51,7 @@ namespace OpenSim.Capabilities.Handlers
{
public class UploadBakedTextureHandler
{
+
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private Caps m_HostCapsObj;
@@ -79,9 +81,9 @@ namespace OpenSim.Capabilities.Handlers
{
string capsBase = "/CAPS/" + m_HostCapsObj.CapsObjectPath;
string uploaderPath = Util.RandomClass.Next(5000, 8000).ToString("0000");
-
+
BakedTextureUploader uploader =
- new BakedTextureUploader(capsBase + uploaderPath, m_HostCapsObj.HttpListener);
+ new BakedTextureUploader(capsBase + uploaderPath, m_HostCapsObj.HttpListener, m_HostCapsObj.AgentID);
uploader.OnUpLoad += BakedTextureUploaded;
m_HostCapsObj.HttpListener.AddStreamHandler(
@@ -125,6 +127,7 @@ namespace OpenSim.Capabilities.Handlers
asset.Temporary = true;
asset.Local = !m_persistBakedTextures; // Local assets aren't persisted, non-local are
m_assetService.Store(asset);
+
}
}
@@ -137,15 +140,19 @@ namespace OpenSim.Capabilities.Handlers
private string uploaderPath = String.Empty;
private UUID newAssetID;
private IHttpServer httpListener;
+ private UUID AgentId = UUID.Zero;
- public BakedTextureUploader(string path, IHttpServer httpServer)
+ public BakedTextureUploader(string path, IHttpServer httpServer, UUID uUID)
{
newAssetID = UUID.Random();
uploaderPath = path;
httpListener = httpServer;
+ AgentId = uUID;
// m_log.InfoFormat("[CAPS] baked texture upload starting for {0}",newAssetID);
}
+
+
///
/// Handle raw uploaded baked texture data.
///
--
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')
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')
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 598f891d703593bde4b96472b5d1b1ce6aaf4c74 Mon Sep 17 00:00:00 2001
From: Melanie
Date: Wed, 6 Feb 2013 04:03:32 +0100
Subject: Move SoubleQueu to Util. Change HTTP inv to prioritize COF. Determine
COF for SP
---
.../Handlers/WebFetchInventoryDescendents/WebFetchInvDescHandler.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'OpenSim/Capabilities')
diff --git a/OpenSim/Capabilities/Handlers/WebFetchInventoryDescendents/WebFetchInvDescHandler.cs b/OpenSim/Capabilities/Handlers/WebFetchInventoryDescendents/WebFetchInvDescHandler.cs
index 9a6ca86..11a2698 100644
--- a/OpenSim/Capabilities/Handlers/WebFetchInventoryDescendents/WebFetchInvDescHandler.cs
+++ b/OpenSim/Capabilities/Handlers/WebFetchInventoryDescendents/WebFetchInvDescHandler.cs
@@ -435,4 +435,4 @@ namespace OpenSim.Capabilities.Handlers
return llsdItem;
}
}
-}
\ No newline at end of file
+}
--
cgit v1.1
From 8c0b9080a4fb013d559966fc8c8175fb16162c2d Mon Sep 17 00:00:00 2001
From: Melanie
Date: Mon, 18 Feb 2013 21:09:14 +0100
Subject: Fix an issue where the viewer would request the seed cap before there
was a handler for it.
---
OpenSim/Capabilities/Caps.cs | 13 +++++++++++++
1 file changed, 13 insertions(+)
(limited to 'OpenSim/Capabilities')
diff --git a/OpenSim/Capabilities/Caps.cs b/OpenSim/Capabilities/Caps.cs
index bc6f6f9..241fef3 100644
--- a/OpenSim/Capabilities/Caps.cs
+++ b/OpenSim/Capabilities/Caps.cs
@@ -30,6 +30,7 @@ using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Reflection;
+using System.Threading;
using log4net;
using Nini.Config;
using OpenMetaverse;
@@ -68,6 +69,7 @@ namespace OpenSim.Framework.Capabilities
private IHttpServer m_httpListener;
private UUID m_agentID;
private string m_regionName;
+ private ManualResetEvent m_capsActive = new ManualResetEvent(false);
public UUID AgentID
{
@@ -171,5 +173,16 @@ namespace OpenSim.Framework.Capabilities
}
}
}
+
+ public void Activate()
+ {
+ m_capsActive.Set();
+ }
+
+ public bool WaitForActivation()
+ {
+ // Wait for 30s. If that elapses, return false and run without caps
+ return m_capsActive.WaitOne(30000);
+ }
}
}
--
cgit v1.1
From 0af1d8fe196e403c066f7fc3dbc9f4b897b4da2c Mon Sep 17 00:00:00 2001
From: Melanie
Date: Tue, 30 Apr 2013 23:35:59 +0200
Subject: Fix CAPS to work like they should - do not send caps to the viewer if
they're not in the requested caps list. The previous wrong behavior caused
the debug setting "UseHTTPInventory" to fail on all viewers when turned off.
UDB inventory would not be correctly used in that case.
---
OpenSim/Capabilities/CapsHandlers.cs | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
(limited to 'OpenSim/Capabilities')
diff --git a/OpenSim/Capabilities/CapsHandlers.cs b/OpenSim/Capabilities/CapsHandlers.cs
index 1709f46..458272d 100644
--- a/OpenSim/Capabilities/CapsHandlers.cs
+++ b/OpenSim/Capabilities/CapsHandlers.cs
@@ -158,7 +158,7 @@ namespace OpenSim.Framework.Capabilities
/// capabilities and their handler details.
///
/// If true, then exclude the seed cap.
- public Hashtable GetCapsDetails(bool excludeSeed)
+ public Hashtable GetCapsDetails(bool excludeSeed, List requestedCaps)
{
Hashtable caps = new Hashtable();
string protocol = "http://";
@@ -175,6 +175,9 @@ namespace OpenSim.Framework.Capabilities
if (excludeSeed && "SEED" == capsName)
continue;
+ if (requestedCaps != null && !requestedCaps.Contains(capsName))
+ continue;
+
caps[capsName] = baseUrl + m_capsHandlers[capsName].Path;
}
}
@@ -182,4 +185,4 @@ namespace OpenSim.Framework.Capabilities
return caps;
}
}
-}
\ No newline at end of file
+}
--
cgit v1.1
From 9589a09eda2a08c12dc54a99fb04faa18e5c6de7 Mon Sep 17 00:00:00 2001
From: Melanie
Date: Fri, 31 May 2013 22:02:31 +0200
Subject: Fix multi-wear of alpha and tattoo layers.
---
OpenSim/Capabilities/Handlers/FetchInventory2/FetchInventory2Handler.cs | 2 +-
.../Handlers/WebFetchInventoryDescendents/WebFetchInvDescHandler.cs | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
(limited to 'OpenSim/Capabilities')
diff --git a/OpenSim/Capabilities/Handlers/FetchInventory2/FetchInventory2Handler.cs b/OpenSim/Capabilities/Handlers/FetchInventory2/FetchInventory2Handler.cs
index c0ca1e1..c305797 100644
--- a/OpenSim/Capabilities/Handlers/FetchInventory2/FetchInventory2Handler.cs
+++ b/OpenSim/Capabilities/Handlers/FetchInventory2/FetchInventory2Handler.cs
@@ -97,7 +97,7 @@ namespace OpenSim.Capabilities.Handlers
llsdItem.asset_id = invItem.AssetID;
llsdItem.created_at = invItem.CreationDate;
llsdItem.desc = invItem.Description;
- llsdItem.flags = (int)invItem.Flags;
+ llsdItem.flags = ((int)invItem.Flags) & 0xff;
llsdItem.item_id = invItem.ID;
llsdItem.name = invItem.Name;
llsdItem.parent_id = invItem.Folder;
diff --git a/OpenSim/Capabilities/Handlers/WebFetchInventoryDescendents/WebFetchInvDescHandler.cs b/OpenSim/Capabilities/Handlers/WebFetchInventoryDescendents/WebFetchInvDescHandler.cs
index 11a2698..16e2f2d 100644
--- a/OpenSim/Capabilities/Handlers/WebFetchInventoryDescendents/WebFetchInvDescHandler.cs
+++ b/OpenSim/Capabilities/Handlers/WebFetchInventoryDescendents/WebFetchInvDescHandler.cs
@@ -411,7 +411,7 @@ namespace OpenSim.Capabilities.Handlers
llsdItem.asset_id = invItem.AssetID;
llsdItem.created_at = invItem.CreationDate;
llsdItem.desc = invItem.Description;
- llsdItem.flags = (int)invItem.Flags;
+ llsdItem.flags = ((int)invItem.Flags) & 0xff;
llsdItem.item_id = invItem.ID;
llsdItem.name = invItem.Name;
llsdItem.parent_id = invItem.Folder;
--
cgit v1.1
From 74efe1e393e748d5f9ace32044c705533be64d6a Mon Sep 17 00:00:00 2001
From: UbitUmarov
Date: Sat, 9 Aug 2014 15:08:21 +0100
Subject: explicitly force a reset to the event on creation #Please enter the
commit message for your changes. Lines starting
---
OpenSim/Capabilities/Caps.cs | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
(limited to 'OpenSim/Capabilities')
diff --git a/OpenSim/Capabilities/Caps.cs b/OpenSim/Capabilities/Caps.cs
index 30a323e..b35e6b4 100644
--- a/OpenSim/Capabilities/Caps.cs
+++ b/OpenSim/Capabilities/Caps.cs
@@ -139,6 +139,7 @@ namespace OpenSim.Framework.Capabilities
m_agentID = agent;
m_capsHandlers = new CapsHandlers(httpServer, httpListen, httpPort, (httpServer == null) ? false : httpServer.UseSSL);
m_regionName = regionName;
+ m_capsActive.Reset();
}
///
@@ -263,7 +264,7 @@ namespace OpenSim.Framework.Capabilities
public bool WaitForActivation()
{
// Wait for 30s. If that elapses, return false and run without caps
- return m_capsActive.WaitOne(30000);
+ return m_capsActive.WaitOne(120000);
}
}
}
\ No newline at end of file
--
cgit v1.1
From bfb51857472ac89abfb7b6dbf1704764c0d1edff Mon Sep 17 00:00:00 2001
From: UbitUmarov
Date: Tue, 14 Oct 2014 02:25:22 +0100
Subject: lso remove caps with "PUT" http method
---
OpenSim/Capabilities/CapsHandlers.cs | 1 +
1 file changed, 1 insertion(+)
(limited to 'OpenSim/Capabilities')
diff --git a/OpenSim/Capabilities/CapsHandlers.cs b/OpenSim/Capabilities/CapsHandlers.cs
index 890df90..04cede1 100644
--- a/OpenSim/Capabilities/CapsHandlers.cs
+++ b/OpenSim/Capabilities/CapsHandlers.cs
@@ -90,6 +90,7 @@ namespace OpenSim.Framework.Capabilities
lock (m_capsHandlers)
{
m_httpListener.RemoveStreamHandler("POST", m_capsHandlers[capsName].Path);
+ m_httpListener.RemoveStreamHandler("PUT", m_capsHandlers[capsName].Path);
m_httpListener.RemoveStreamHandler("GET", m_capsHandlers[capsName].Path);
m_capsHandlers.Remove(capsName);
}
--
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/GetMesh/GetMeshHandler.cs | 12 ++++++------
.../Capabilities/Handlers/GetTexture/GetTextureHandler.cs | 4 ++--
2 files changed, 8 insertions(+), 8 deletions(-)
(limited to 'OpenSim/Capabilities')
diff --git a/OpenSim/Capabilities/Handlers/GetMesh/GetMeshHandler.cs b/OpenSim/Capabilities/Handlers/GetMesh/GetMeshHandler.cs
index ec574a3..ae1aed7 100644
--- a/OpenSim/Capabilities/Handlers/GetMesh/GetMeshHandler.cs
+++ b/OpenSim/Capabilities/Handlers/GetMesh/GetMeshHandler.cs
@@ -61,7 +61,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;
ret["int_lod"] = 0;
@@ -98,7 +98,7 @@ namespace OpenSim.Capabilities.Handlers
Hashtable responsedata = new Hashtable();
responsedata["int_response_code"] = 400; //501; //410; //404;
responsedata["content_type"] = "text/plain";
- responsedata["keepalive"] = false;
+ responsedata["keepalive"] = true;
responsedata["str_response_string"] = "Request wasn't what was expected";
responsedata["reusecontext"] = false;
responsedata["int_lod"] = 0;
@@ -116,7 +116,7 @@ namespace OpenSim.Capabilities.Handlers
{
responsedata["int_response_code"] = 404; //501; //410; //404;
responsedata["content_type"] = "text/plain";
- responsedata["keepalive"] = false;
+ responsedata["keepalive"] = true;
responsedata["str_response_string"] = "The asset service is unavailable. So is your mesh.";
responsedata["reusecontext"] = false;
return responsedata;
@@ -152,7 +152,7 @@ namespace OpenSim.Capabilities.Handlers
{
responsedata["int_response_code"] = 404; //501; //410; //404;
responsedata["content_type"] = "text/plain";
- responsedata["keepalive"] = false;
+ responsedata["keepalive"] = true;
responsedata["str_response_string"] = "This range doesnt exist.";
responsedata["reusecontext"] = false;
responsedata["int_lod"] = 3;
@@ -228,7 +228,7 @@ namespace OpenSim.Capabilities.Handlers
{
responsedata["int_response_code"] = 404; //501; //410; //404;
responsedata["content_type"] = "text/plain";
- responsedata["keepalive"] = false;
+ responsedata["keepalive"] = true;
responsedata["str_response_string"] = "Unfortunately, this asset isn't a mesh.";
responsedata["reusecontext"] = false;
responsedata["int_lod"] = 1;
@@ -239,7 +239,7 @@ namespace OpenSim.Capabilities.Handlers
{
responsedata["int_response_code"] = 404; //501; //410; //404;
responsedata["content_type"] = "text/plain";
- responsedata["keepalive"] = false;
+ responsedata["keepalive"] = true;
responsedata["str_response_string"] = "Your Mesh wasn't found. Sorry!";
responsedata["reusecontext"] = false;
responsedata["int_lod"] = 0;
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/GetMesh/GetMeshHandler.cs | 12 ++++++------
.../Capabilities/Handlers/GetTexture/GetTextureHandler.cs | 4 ++--
2 files changed, 8 insertions(+), 8 deletions(-)
(limited to 'OpenSim/Capabilities')
diff --git a/OpenSim/Capabilities/Handlers/GetMesh/GetMeshHandler.cs b/OpenSim/Capabilities/Handlers/GetMesh/GetMeshHandler.cs
index ae1aed7..ec574a3 100644
--- a/OpenSim/Capabilities/Handlers/GetMesh/GetMeshHandler.cs
+++ b/OpenSim/Capabilities/Handlers/GetMesh/GetMeshHandler.cs
@@ -61,7 +61,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;
ret["int_lod"] = 0;
@@ -98,7 +98,7 @@ namespace OpenSim.Capabilities.Handlers
Hashtable responsedata = new Hashtable();
responsedata["int_response_code"] = 400; //501; //410; //404;
responsedata["content_type"] = "text/plain";
- responsedata["keepalive"] = true;
+ responsedata["keepalive"] = false;
responsedata["str_response_string"] = "Request wasn't what was expected";
responsedata["reusecontext"] = false;
responsedata["int_lod"] = 0;
@@ -116,7 +116,7 @@ namespace OpenSim.Capabilities.Handlers
{
responsedata["int_response_code"] = 404; //501; //410; //404;
responsedata["content_type"] = "text/plain";
- responsedata["keepalive"] = true;
+ responsedata["keepalive"] = false;
responsedata["str_response_string"] = "The asset service is unavailable. So is your mesh.";
responsedata["reusecontext"] = false;
return responsedata;
@@ -152,7 +152,7 @@ namespace OpenSim.Capabilities.Handlers
{
responsedata["int_response_code"] = 404; //501; //410; //404;
responsedata["content_type"] = "text/plain";
- responsedata["keepalive"] = true;
+ responsedata["keepalive"] = false;
responsedata["str_response_string"] = "This range doesnt exist.";
responsedata["reusecontext"] = false;
responsedata["int_lod"] = 3;
@@ -228,7 +228,7 @@ namespace OpenSim.Capabilities.Handlers
{
responsedata["int_response_code"] = 404; //501; //410; //404;
responsedata["content_type"] = "text/plain";
- responsedata["keepalive"] = true;
+ responsedata["keepalive"] = false;
responsedata["str_response_string"] = "Unfortunately, this asset isn't a mesh.";
responsedata["reusecontext"] = false;
responsedata["int_lod"] = 1;
@@ -239,7 +239,7 @@ namespace OpenSim.Capabilities.Handlers
{
responsedata["int_response_code"] = 404; //501; //410; //404;
responsedata["content_type"] = "text/plain";
- responsedata["keepalive"] = true;
+ responsedata["keepalive"] = false;
responsedata["str_response_string"] = "Your Mesh wasn't found. Sorry!";
responsedata["reusecontext"] = false;
responsedata["int_lod"] = 0;
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