aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Capabilities/Caps.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Capabilities/Caps.cs')
-rw-r--r--OpenSim/Region/Capabilities/Caps.cs11
1 files changed, 7 insertions, 4 deletions
diff --git a/OpenSim/Region/Capabilities/Caps.cs b/OpenSim/Region/Capabilities/Caps.cs
index 0f6c471..1d07683 100644
--- a/OpenSim/Region/Capabilities/Caps.cs
+++ b/OpenSim/Region/Capabilities/Caps.cs
@@ -82,7 +82,7 @@ namespace OpenSim.Region.Capabilities
82 private void AddCapsHandler( BaseHttpServer httpListener, string path, RestMethod restMethod ) 82 private void AddCapsHandler( BaseHttpServer httpListener, string path, RestMethod restMethod )
83 { 83 {
84 string capsBase = "/CAPS/" + m_capsObjectPath; 84 string capsBase = "/CAPS/" + m_capsObjectPath;
85 httpListener.AddStreamHandler(capsBase + path, new RestStreamHandler(restMethod, "POST", "application/xml")); 85 httpListener.AddStreamHandler(new RestStreamHandler("POST", capsBase + path, restMethod));
86 } 86 }
87 87
88 /// <summary> 88 /// <summary>
@@ -211,9 +211,11 @@ namespace OpenSim.Region.Capabilities
211 string res = ""; 211 string res = "";
212 LLUUID newAsset = LLUUID.Random(); 212 LLUUID newAsset = LLUUID.Random();
213 LLUUID newInvItem = LLUUID.Random(); 213 LLUUID newInvItem = LLUUID.Random();
214 string uploaderPath = m_capsObjectPath + Util.RandomClass.Next(5000, 8000).ToString("0000"); 214 string uploaderPath = Util.RandomClass.Next(5000, 8000).ToString("0000");
215 AssetUploader uploader = new AssetUploader(newAsset, newInvItem, uploaderPath, this.httpListener); 215 AssetUploader uploader = new AssetUploader(newAsset, newInvItem, uploaderPath, this.httpListener);
216 httpListener.AddRestHandler("POST", "/CAPS/" + uploaderPath, uploader.uploaderCaps); 216
217 AddCapsHandler( httpListener, uploaderPath, uploader.uploaderCaps);
218
217 string uploaderURL = "http://" + m_httpListenerHostName + ":" + m_httpListenPort.ToString() + "/CAPS/" + uploaderPath; 219 string uploaderURL = "http://" + m_httpListenerHostName + ":" + m_httpListenPort.ToString() + "/CAPS/" + uploaderPath;
218 //Console.WriteLine("uploader url is " + uploaderURL); 220 //Console.WriteLine("uploader url is " + uploaderURL);
219 res += "<llsd><map>"; 221 res += "<llsd><map>";
@@ -269,7 +271,8 @@ namespace OpenSim.Region.Capabilities
269 res += "</map></llsd>"; 271 res += "</map></llsd>";
270 272
271 // Console.WriteLine("asset " + newAssetID.ToStringHyphenated() + " , inventory item " + inv.ToStringHyphenated()); 273 // Console.WriteLine("asset " + newAssetID.ToStringHyphenated() + " , inventory item " + inv.ToStringHyphenated());
272 httpListener.RemoveRestHandler("POST", "/CAPS/" + uploaderPath); 274 httpListener.RemoveStreamHandler("POST", "/CAPS/" + uploaderPath);
275
273 if (OnUpLoad != null) 276 if (OnUpLoad != null)
274 { 277 {
275 OnUpLoad(newAssetID, inv, data); 278 OnUpLoad(newAssetID, inv, data);