aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/Scripting/LSLHttp
diff options
context:
space:
mode:
authorubit2012-12-03 21:26:36 +0100
committerubit2012-12-03 21:26:36 +0100
commit5d4b7d537d872d27c394402d3483c2a9bd2153f0 (patch)
tree39aae50386555bf024700314fb7bee5121a9d683 /OpenSim/Region/CoreModules/Scripting/LSLHttp
parentMerge branch 'ubitwork' of ssh://3dhosting.de/var/git/careminster into ubitwork (diff)
parentMerge branch 'avination' into ubitwork (diff)
downloadopensim-SC-5d4b7d537d872d27c394402d3483c2a9bd2153f0.zip
opensim-SC-5d4b7d537d872d27c394402d3483c2a9bd2153f0.tar.gz
opensim-SC-5d4b7d537d872d27c394402d3483c2a9bd2153f0.tar.bz2
opensim-SC-5d4b7d537d872d27c394402d3483c2a9bd2153f0.tar.xz
Merge branch 'ubitwork' of ssh://3dhosting.de/var/git/careminster into ubitwork
Diffstat (limited to 'OpenSim/Region/CoreModules/Scripting/LSLHttp')
-rw-r--r--OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs22
1 files changed, 22 insertions, 0 deletions
diff --git a/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs b/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs
index 56221aa..da59eab 100644
--- a/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs
+++ b/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs
@@ -31,6 +31,7 @@ using System.Collections.Generic;
31using System.Collections; 31using System.Collections;
32using System.Reflection; 32using System.Reflection;
33using log4net; 33using log4net;
34using Mono.Addins;
34using Nini.Config; 35using Nini.Config;
35using OpenMetaverse; 36using OpenMetaverse;
36using OpenSim.Framework; 37using OpenSim.Framework;
@@ -58,6 +59,7 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
58 public string body; 59 public string body;
59 public int responseCode; 60 public int responseCode;
60 public string responseBody; 61 public string responseBody;
62 public string responseType = "text/plain";
61 //public ManualResetEvent ev; 63 //public ManualResetEvent ev;
62 public bool requestDone; 64 public bool requestDone;
63 public int startTime; 65 public int startTime;
@@ -65,6 +67,10 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
65 public string uri; 67 public string uri;
66 } 68 }
67 69
70 /// <summary>
71 /// This module provides external URLs for in-world scripts.
72 /// </summary>
73 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "UrlModule")]
68 public class UrlModule : ISharedRegionModule, IUrlModule 74 public class UrlModule : ISharedRegionModule, IUrlModule
69 { 75 {
70 private static readonly ILog m_log = 76 private static readonly ILog m_log =
@@ -270,6 +276,22 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
270 } 276 }
271 } 277 }
272 278
279 public void HttpContentType(UUID request, string type)
280 {
281 lock (m_UrlMap)
282 {
283 if (m_RequestMap.ContainsKey(request))
284 {
285 UrlData urlData = m_RequestMap[request];
286 urlData.requests[request].responseType = type;
287 }
288 else
289 {
290 m_log.Info("[HttpRequestHandler] There is no http-in request with id " + request.ToString());
291 }
292 }
293 }
294
273 public void HttpResponse(UUID request, int status, string body) 295 public void HttpResponse(UUID request, int status, string body)
274 { 296 {
275 lock (m_RequestMap) 297 lock (m_RequestMap)