diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/Scripting')
-rw-r--r-- | OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs | 28 |
2 files changed, 26 insertions, 4 deletions
diff --git a/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs b/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs index f5b575b..d342163 100644 --- a/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs +++ b/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs | |||
@@ -110,7 +110,7 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest | |||
110 | 110 | ||
111 | public HttpRequestModule() | 111 | public HttpRequestModule() |
112 | { | 112 | { |
113 | ServicePointManager.ServerCertificateValidationCallback +=ValidateServerCertificate; | 113 | // ServicePointManager.ServerCertificateValidationCallback +=ValidateServerCertificate; |
114 | } | 114 | } |
115 | 115 | ||
116 | public static bool ValidateServerCertificate( | 116 | public static bool ValidateServerCertificate( |
diff --git a/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs b/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs index 11fc513..5f72733 100644 --- a/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs | |||
@@ -258,7 +258,7 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp | |||
258 | string uri = "/lslhttp/" + urlcode.ToString() + "/"; | 258 | string uri = "/lslhttp/" + urlcode.ToString() + "/"; |
259 | 259 | ||
260 | PollServiceEventArgs args | 260 | PollServiceEventArgs args |
261 | = new PollServiceEventArgs(HttpRequestHandler, uri, HasEvents, GetEvents, NoEvents, urlcode, 25000); | 261 | = new PollServiceEventArgs(HttpRequestHandler, uri, HasEvents, GetEvents, NoEvents, Drop, urlcode, 25000); |
262 | args.Type = PollServiceEventArgs.EventType.LslHttp; | 262 | args.Type = PollServiceEventArgs.EventType.LslHttp; |
263 | m_HttpServer.AddPollServiceHTTPHandler(uri, args); | 263 | m_HttpServer.AddPollServiceHTTPHandler(uri, args); |
264 | 264 | ||
@@ -316,7 +316,7 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp | |||
316 | string uri = "/lslhttps/" + urlcode.ToString() + "/"; | 316 | string uri = "/lslhttps/" + urlcode.ToString() + "/"; |
317 | 317 | ||
318 | PollServiceEventArgs args | 318 | PollServiceEventArgs args |
319 | = new PollServiceEventArgs(HttpRequestHandler, uri, HasEvents, GetEvents, NoEvents, urlcode, 25000); | 319 | = new PollServiceEventArgs(HttpRequestHandler, uri, HasEvents, GetEvents, NoEvents, Drop, urlcode, 25000); |
320 | args.Type = PollServiceEventArgs.EventType.LslHttp; | 320 | args.Type = PollServiceEventArgs.EventType.LslHttp; |
321 | m_HttpsServer.AddPollServiceHTTPHandler(uri, args); | 321 | m_HttpsServer.AddPollServiceHTTPHandler(uri, args); |
322 | 322 | ||
@@ -570,6 +570,28 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp | |||
570 | } | 570 | } |
571 | } | 571 | } |
572 | } | 572 | } |
573 | |||
574 | protected void Drop(UUID requestID, UUID sessionID) | ||
575 | { | ||
576 | UrlData url = null; | ||
577 | lock (m_RequestMap) | ||
578 | { | ||
579 | if (m_RequestMap.ContainsKey(requestID)) | ||
580 | { | ||
581 | url = m_RequestMap[requestID]; | ||
582 | m_RequestMap.Remove(requestID); | ||
583 | if(url != null) | ||
584 | { | ||
585 | lock (url.requests) | ||
586 | { | ||
587 | if(url.requests.ContainsKey(requestID)) | ||
588 | url.requests.Remove(requestID); | ||
589 | } | ||
590 | } | ||
591 | } | ||
592 | } | ||
593 | } | ||
594 | |||
573 | protected Hashtable GetEvents(UUID requestID, UUID sessionID) | 595 | protected Hashtable GetEvents(UUID requestID, UUID sessionID) |
574 | { | 596 | { |
575 | UrlData url = null; | 597 | UrlData url = null; |
@@ -729,9 +751,9 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp | |||
729 | else | 751 | else |
730 | { | 752 | { |
731 | queryString = queryString + val + "&"; | 753 | queryString = queryString + val + "&"; |
732 | } | ||
733 | } | 754 | } |
734 | } | 755 | } |
756 | } | ||
735 | if (queryString.Length > 1) | 757 | if (queryString.Length > 1) |
736 | queryString = queryString.Substring(0, queryString.Length - 1); | 758 | queryString = queryString.Substring(0, queryString.Length - 1); |
737 | 759 | ||