aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Capabilities
diff options
context:
space:
mode:
authorMelanie2012-09-27 17:29:44 +0100
committerMelanie2012-09-27 17:29:44 +0100
commit001ec0e2e6f8c426af8f4a1c1eb9be4db066aea4 (patch)
tree11170fddbd0f4c71c6f8288b5848442dfdc90d76 /OpenSim/Capabilities
parentRemove a core undo call that we don't need. (diff)
parentMerge branch 'ubitwork' into avination (diff)
downloadopensim-SC_OLD-001ec0e2e6f8c426af8f4a1c1eb9be4db066aea4.zip
opensim-SC_OLD-001ec0e2e6f8c426af8f4a1c1eb9be4db066aea4.tar.gz
opensim-SC_OLD-001ec0e2e6f8c426af8f4a1c1eb9be4db066aea4.tar.bz2
opensim-SC_OLD-001ec0e2e6f8c426af8f4a1c1eb9be4db066aea4.tar.xz
Merge branch 'avination' into careminster
Conflicts: OpenSim/Region/CoreModules/Agent/AssetTransaction/AgentAssetsTransactions.cs OpenSim/Region/Framework/Scenes/Scene.cs
Diffstat (limited to 'OpenSim/Capabilities')
-rw-r--r--OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs31
-rw-r--r--OpenSim/Capabilities/LLSDAssetUploadComplete.cs3
-rw-r--r--OpenSim/Capabilities/LLSDAssetUploadRequest.cs4
-rw-r--r--OpenSim/Capabilities/LLSDAssetUploadResponse.cs10
4 files changed, 37 insertions, 11 deletions
diff --git a/OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs b/OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs
index 7b4e957..c275d87 100644
--- a/OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs
+++ b/OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs
@@ -187,7 +187,11 @@ namespace OpenSim.Capabilities.Handlers
187 response["headers"] = headers; 187 response["headers"] = headers;
188 188
189 string range = String.Empty; 189 string range = String.Empty;
190 if (((Hashtable)request["headers"])["Range"] != null) 190
191 if (((Hashtable)request["headers"])["range"] != null)
192 range = (string)((Hashtable)request["headers"])["range"];
193
194 else if (((Hashtable)request["headers"])["Range"] != null)
191 range = (string)((Hashtable)request["headers"])["Range"]; 195 range = (string)((Hashtable)request["headers"])["Range"];
192 196
193 if (!String.IsNullOrEmpty(range)) // JP2's only 197 if (!String.IsNullOrEmpty(range)) // JP2's only
@@ -227,17 +231,22 @@ namespace OpenSim.Capabilities.Handlers
227 231
228// m_log.Debug("Serving " + start + " to " + end + " of " + texture.Data.Length + " bytes for texture " + texture.ID); 232// m_log.Debug("Serving " + start + " to " + end + " of " + texture.Data.Length + " bytes for texture " + texture.ID);
229 233
230 // Always return PartialContent, even if the range covered the entire data length
231 // We were accidentally sending back 404 before in this situation
232 // https://issues.apache.org/bugzilla/show_bug.cgi?id=51878 supports sending 206 even if the
233 // entire range is requested, and viewer 3.2.2 (and very probably earlier) seems fine with this.
234 response["int_response_code"] = (int)System.Net.HttpStatusCode.PartialContent;
235 response["content-type"] = texture.Metadata.ContentType; 234 response["content-type"] = texture.Metadata.ContentType;
236 headers["Content-Range"] = String.Format("bytes {0}-{1}/{2}", start, end, texture.Data.Length); 235
237 236 if (start == 0 && len == texture.Data.Length) // well redudante maybe
238 byte[] d = new byte[len]; 237 {
239 Array.Copy(texture.Data, start, d, 0, len); 238 response["int_response_code"] = (int)System.Net.HttpStatusCode.OK;
240 response["bin_response_data"] = d; 239 response["bin_response_data"] = texture.Data;
240 }
241 else
242 {
243 response["int_response_code"] = (int)System.Net.HttpStatusCode.PartialContent;
244 headers["Content-Range"] = String.Format("bytes {0}-{1}/{2}", start, end, texture.Data.Length);
245
246 byte[] d = new byte[len];
247 Array.Copy(texture.Data, start, d, 0, len);
248 response["bin_response_data"] = d;
249 }
241// response.Body.Write(texture.Data, start, len); 250// response.Body.Write(texture.Data, start, len);
242 } 251 }
243 } 252 }
diff --git a/OpenSim/Capabilities/LLSDAssetUploadComplete.cs b/OpenSim/Capabilities/LLSDAssetUploadComplete.cs
index ab6cee5..ae8eb09 100644
--- a/OpenSim/Capabilities/LLSDAssetUploadComplete.cs
+++ b/OpenSim/Capabilities/LLSDAssetUploadComplete.cs
@@ -30,12 +30,15 @@ using OpenMetaverse;
30 30
31namespace OpenSim.Framework.Capabilities 31namespace OpenSim.Framework.Capabilities
32{ 32{
33
33 [LLSDType("MAP")] 34 [LLSDType("MAP")]
34 public class LLSDAssetUploadComplete 35 public class LLSDAssetUploadComplete
35 { 36 {
36 public string new_asset = String.Empty; 37 public string new_asset = String.Empty;
37 public UUID new_inventory_item = UUID.Zero; 38 public UUID new_inventory_item = UUID.Zero;
39// public UUID new_texture_folder_id = UUID.Zero;
38 public string state = String.Empty; 40 public string state = String.Empty;
41 public LLSDAssetUploadError error = null;
39 //public bool success = false; 42 //public bool success = false;
40 43
41 public LLSDAssetUploadComplete() 44 public LLSDAssetUploadComplete()
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
45 public string asset_type = String.Empty; 45 public string asset_type = String.Empty;
46 public string description = String.Empty; 46 public string description = String.Empty;
47 public UUID folder_id = UUID.Zero; 47 public UUID folder_id = UUID.Zero;
48 public UUID texture_folder_id = UUID.Zero;
49 public int next_owner_mask = 0;
50 public int group_mask = 0;
51 public int everyone_mask = 0;
48 public string inventory_type = String.Empty; 52 public string inventory_type = String.Empty;
49 public string name = String.Empty; 53 public string name = String.Empty;
50 public LLSDAssetResource asset_resources = new LLSDAssetResource(); 54 public LLSDAssetResource asset_resources = new LLSDAssetResource();
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 @@
26 */ 26 */
27 27
28using System; 28using System;
29using OpenMetaverse;
29 30
30namespace OpenSim.Framework.Capabilities 31namespace OpenSim.Framework.Capabilities
31{ 32{
32 [OSDMap] 33 [OSDMap]
34 public class LLSDAssetUploadError
35 {
36 public string message = String.Empty;
37 public UUID identifier = UUID.Zero;
38 }
39
40 [OSDMap]
33 public class LLSDAssetUploadResponsePricebrkDown 41 public class LLSDAssetUploadResponsePricebrkDown
34 { 42 {
35 public int mesh_streaming; 43 public int mesh_streaming;
@@ -56,11 +64,13 @@ namespace OpenSim.Framework.Capabilities
56 public string state = String.Empty; 64 public string state = String.Empty;
57 public int upload_price = 0; 65 public int upload_price = 0;
58 public LLSDAssetUploadResponseData data = null; 66 public LLSDAssetUploadResponseData data = null;
67 public LLSDAssetUploadError error = null;
59 public LLSDAssetUploadResponse() 68 public LLSDAssetUploadResponse()
60 { 69 {
61 } 70 }
62 } 71 }
63 72
73
64 [OSDMap] 74 [OSDMap]
65 public class LLSDNewFileAngentInventoryVariablePriceReplyResponse 75 public class LLSDNewFileAngentInventoryVariablePriceReplyResponse
66 { 76 {