diff options
Merge branch 'ubitwork' of ssh://3dhosting.de/var/git/careminster into ubitwork
Diffstat (limited to 'OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs | 22 |
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; | |||
31 | using System.Collections; | 31 | using System.Collections; |
32 | using System.Reflection; | 32 | using System.Reflection; |
33 | using log4net; | 33 | using log4net; |
34 | using Mono.Addins; | ||
34 | using Nini.Config; | 35 | using Nini.Config; |
35 | using OpenMetaverse; | 36 | using OpenMetaverse; |
36 | using OpenSim.Framework; | 37 | using 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) |