diff options
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r-- | OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs b/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs index 311deab..290daa9 100644 --- a/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs | |||
@@ -225,7 +225,7 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp | |||
225 | string uri = "/lslhttp/" + urlcode.ToString() + "/"; | 225 | string uri = "/lslhttp/" + urlcode.ToString() + "/"; |
226 | 226 | ||
227 | PollServiceEventArgs args | 227 | PollServiceEventArgs args |
228 | = new PollServiceEventArgs(HttpRequestHandler, uri, HasEvents, GetEvents, NoEvents, urlcode, 25000); | 228 | = new PollServiceEventArgs(HttpRequestHandler, uri, HasEvents, GetEvents, NoEvents, Drop, urlcode, 25000); |
229 | args.Type = PollServiceEventArgs.EventType.LslHttp; | 229 | args.Type = PollServiceEventArgs.EventType.LslHttp; |
230 | m_HttpServer.AddPollServiceHTTPHandler(uri, args); | 230 | m_HttpServer.AddPollServiceHTTPHandler(uri, args); |
231 | 231 | ||
@@ -276,7 +276,7 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp | |||
276 | string uri = "/lslhttps/" + urlcode.ToString() + "/"; | 276 | string uri = "/lslhttps/" + urlcode.ToString() + "/"; |
277 | 277 | ||
278 | PollServiceEventArgs args | 278 | PollServiceEventArgs args |
279 | = new PollServiceEventArgs(HttpRequestHandler, uri, HasEvents, GetEvents, NoEvents, urlcode, 25000); | 279 | = new PollServiceEventArgs(HttpRequestHandler, uri, HasEvents, GetEvents, NoEvents, Drop, urlcode, 25000); |
280 | args.Type = PollServiceEventArgs.EventType.LslHttp; | 280 | args.Type = PollServiceEventArgs.EventType.LslHttp; |
281 | m_HttpsServer.AddPollServiceHTTPHandler(uri, args); | 281 | m_HttpsServer.AddPollServiceHTTPHandler(uri, args); |
282 | 282 | ||
@@ -530,6 +530,28 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp | |||
530 | } | 530 | } |
531 | } | 531 | } |
532 | } | 532 | } |
533 | |||
534 | protected void Drop(UUID requestID, UUID sessionID) | ||
535 | { | ||
536 | UrlData url = null; | ||
537 | lock (m_RequestMap) | ||
538 | { | ||
539 | if (m_RequestMap.ContainsKey(requestID)) | ||
540 | { | ||
541 | url = m_RequestMap[requestID]; | ||
542 | m_RequestMap.Remove(requestID); | ||
543 | if(url != null) | ||
544 | { | ||
545 | lock (url.requests) | ||
546 | { | ||
547 | if(url.requests.ContainsKey(requestID)) | ||
548 | url.requests.Remove(requestID); | ||
549 | } | ||
550 | } | ||
551 | } | ||
552 | } | ||
553 | } | ||
554 | |||
533 | protected Hashtable GetEvents(UUID requestID, UUID sessionID) | 555 | protected Hashtable GetEvents(UUID requestID, UUID sessionID) |
534 | { | 556 | { |
535 | UrlData url = null; | 557 | UrlData url = null; |
@@ -689,9 +711,9 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp | |||
689 | else | 711 | else |
690 | { | 712 | { |
691 | queryString = queryString + val + "&"; | 713 | queryString = queryString + val + "&"; |
692 | } | ||
693 | } | 714 | } |
694 | } | 715 | } |
716 | } | ||
695 | if (queryString.Length > 1) | 717 | if (queryString.Length > 1) |
696 | queryString = queryString.Substring(0, queryString.Length - 1); | 718 | queryString = queryString.Substring(0, queryString.Length - 1); |
697 | 719 | ||