aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Capabilities
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Capabilities')
-rw-r--r--OpenSim/Region/Capabilities/Caps.cs20
-rw-r--r--OpenSim/Region/Capabilities/LLSDCapsDetails.cs2
2 files changed, 13 insertions, 9 deletions
diff --git a/OpenSim/Region/Capabilities/Caps.cs b/OpenSim/Region/Capabilities/Caps.cs
index 6068076..db8df9b 100644
--- a/OpenSim/Region/Capabilities/Caps.cs
+++ b/OpenSim/Region/Capabilities/Caps.cs
@@ -29,6 +29,7 @@ using System;
29using System.Collections; 29using System.Collections;
30using System.Collections.Generic; 30using System.Collections.Generic;
31using System.Text; 31using System.Text;
32using System.IO;
32using libsecondlife; 33using libsecondlife;
33using OpenSim.Framework.Servers; 34using OpenSim.Framework.Servers;
34using OpenSim.Framework.Types; 35using OpenSim.Framework.Types;
@@ -118,7 +119,7 @@ namespace OpenSim.Region.Capabilities
118 string capsBaseUrl = "http://" + m_httpListenerHostName + ":" + m_httpListenPort.ToString() + "/CAPS/" + m_capsObjectPath; 119 string capsBaseUrl = "http://" + m_httpListenerHostName + ":" + m_httpListenPort.ToString() + "/CAPS/" + m_capsObjectPath;
119 120
120 caps.MapLayer = capsBaseUrl + m_mapLayerPath; 121 caps.MapLayer = capsBaseUrl + m_mapLayerPath;
121 // caps.NewFileAgentInventory = capsBaseUrl + m_newInventory; 122 caps.NewFileAgentInventory = capsBaseUrl + m_newInventory;
122 123
123 return caps; 124 return caps;
124 } 125 }
@@ -253,10 +254,12 @@ namespace OpenSim.Region.Capabilities
253 LLUUID newInvItem = LLUUID.Random(); 254 LLUUID newInvItem = LLUUID.Random();
254 string uploaderPath = Util.RandomClass.Next(5000, 8000).ToString("0000"); 255 string uploaderPath = Util.RandomClass.Next(5000, 8000).ToString("0000");
255 AssetUploader uploader = new AssetUploader(newAsset, newInvItem, uploaderPath, this.httpListener); 256 AssetUploader uploader = new AssetUploader(newAsset, newInvItem, uploaderPath, this.httpListener);
257
258 string capsBase = "/CAPS/" + m_capsObjectPath;
259 httpListener.AddStreamHandler(new BinaryStreamHandler("POST", capsBase + uploaderPath, uploader.uploaderCaps));
256 260
257 AddLegacyCapsHandler( httpListener, uploaderPath, uploader.uploaderCaps); 261
258 262 string uploaderURL = "http://" + m_httpListenerHostName + ":" + m_httpListenPort.ToString() + "/CAPS/" + m_capsObjectPath +uploaderPath;
259 string uploaderURL = "http://" + m_httpListenerHostName + ":" + m_httpListenPort.ToString() + "/CAPS/" + uploaderPath;
260 //Console.WriteLine("uploader url is " + uploaderURL); 263 //Console.WriteLine("uploader url is " + uploaderURL);
261 res += "<llsd><map>"; 264 res += "<llsd><map>";
262 res += "<key>uploader</key><string>" + uploaderURL + "</string>"; 265 res += "<key>uploader</key><string>" + uploaderURL + "</string>";
@@ -303,10 +306,10 @@ namespace OpenSim.Region.Capabilities
303 306
304 } 307 }
305 308
306 public string uploaderCaps(string request, string path, string param) 309 public string uploaderCaps(byte[] data, string path, string param)
307 { 310 {
308 Encoding _enc = Encoding.UTF8; 311 //Encoding _enc = Encoding.UTF8;
309 byte[] data = _enc.GetBytes(request); 312 //byte[] data = _enc.GetBytes(request);
310 //Console.WriteLine("recieved upload " + Util.FieldToString(data)); 313 //Console.WriteLine("recieved upload " + Util.FieldToString(data));
311 LLUUID inv = this.inventoryItemID; 314 LLUUID inv = this.inventoryItemID;
312 string res = ""; 315 string res = "";
@@ -324,7 +327,8 @@ namespace OpenSim.Region.Capabilities
324 OnUpLoad(newAssetID, inv, data); 327 OnUpLoad(newAssetID, inv, data);
325 } 328 }
326 329
327 /*FileStream fs = File.Create("upload.jp2"); 330 /*
331 FileStream fs = File.Create("upload.jp2");
328 BinaryWriter bw = new BinaryWriter(fs); 332 BinaryWriter bw = new BinaryWriter(fs);
329 bw.Write(data); 333 bw.Write(data);
330 bw.Close(); 334 bw.Close();
diff --git a/OpenSim/Region/Capabilities/LLSDCapsDetails.cs b/OpenSim/Region/Capabilities/LLSDCapsDetails.cs
index 1f8b242..1522559 100644
--- a/OpenSim/Region/Capabilities/LLSDCapsDetails.cs
+++ b/OpenSim/Region/Capabilities/LLSDCapsDetails.cs
@@ -4,7 +4,7 @@ namespace OpenSim.Region.Capabilities
4 public class LLSDCapsDetails 4 public class LLSDCapsDetails
5 { 5 {
6 public string MapLayer = ""; 6 public string MapLayer = "";
7 //public string NewFileAgentInventory = ""; 7 public string NewFileAgentInventory = "";
8 //public string EventQueueGet = ""; 8 //public string EventQueueGet = "";
9 9
10 public LLSDCapsDetails() 10 public LLSDCapsDetails()