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 895020c..66ebdbe 100644 --- a/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs | |||
@@ -273,7 +273,7 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp | |||
273 | string uri = "/lslhttp/" + urlcode.ToString() + "/"; | 273 | string uri = "/lslhttp/" + urlcode.ToString() + "/"; |
274 | 274 | ||
275 | PollServiceEventArgs args | 275 | PollServiceEventArgs args |
276 | = new PollServiceEventArgs(HttpRequestHandler, uri, HasEvents, GetEvents, NoEvents, urlcode, 25000); | 276 | = new PollServiceEventArgs(HttpRequestHandler, uri, HasEvents, GetEvents, NoEvents, Drop, urlcode, 25000); |
277 | args.Type = PollServiceEventArgs.EventType.LslHttp; | 277 | args.Type = PollServiceEventArgs.EventType.LslHttp; |
278 | m_HttpServer.AddPollServiceHTTPHandler(uri, args); | 278 | m_HttpServer.AddPollServiceHTTPHandler(uri, args); |
279 | 279 | ||
@@ -331,7 +331,7 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp | |||
331 | string uri = "/lslhttps/" + urlcode.ToString() + "/"; | 331 | string uri = "/lslhttps/" + urlcode.ToString() + "/"; |
332 | 332 | ||
333 | PollServiceEventArgs args | 333 | PollServiceEventArgs args |
334 | = new PollServiceEventArgs(HttpRequestHandler, uri, HasEvents, GetEvents, NoEvents, urlcode, 25000); | 334 | = new PollServiceEventArgs(HttpRequestHandler, uri, HasEvents, GetEvents, NoEvents, Drop, urlcode, 25000); |
335 | args.Type = PollServiceEventArgs.EventType.LslHttp; | 335 | args.Type = PollServiceEventArgs.EventType.LslHttp; |
336 | m_HttpsServer.AddPollServiceHTTPHandler(uri, args); | 336 | m_HttpsServer.AddPollServiceHTTPHandler(uri, args); |
337 | 337 | ||
@@ -585,6 +585,28 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp | |||
585 | } | 585 | } |
586 | } | 586 | } |
587 | } | 587 | } |
588 | |||
589 | protected void Drop(UUID requestID, UUID sessionID) | ||
590 | { | ||
591 | UrlData url = null; | ||
592 | lock (m_RequestMap) | ||
593 | { | ||
594 | if (m_RequestMap.ContainsKey(requestID)) | ||
595 | { | ||
596 | url = m_RequestMap[requestID]; | ||
597 | m_RequestMap.Remove(requestID); | ||
598 | if(url != null) | ||
599 | { | ||
600 | lock (url.requests) | ||
601 | { | ||
602 | if(url.requests.ContainsKey(requestID)) | ||
603 | url.requests.Remove(requestID); | ||
604 | } | ||
605 | } | ||
606 | } | ||
607 | } | ||
608 | } | ||
609 | |||
588 | protected Hashtable GetEvents(UUID requestID, UUID sessionID) | 610 | protected Hashtable GetEvents(UUID requestID, UUID sessionID) |
589 | { | 611 | { |
590 | UrlData url = null; | 612 | UrlData url = null; |
@@ -744,9 +766,9 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp | |||
744 | else | 766 | else |
745 | { | 767 | { |
746 | queryString = queryString + val + "&"; | 768 | queryString = queryString + val + "&"; |
747 | } | ||
748 | } | 769 | } |
749 | } | 770 | } |
771 | } | ||
750 | if (queryString.Length > 1) | 772 | if (queryString.Length > 1) |
751 | queryString = queryString.Substring(0, queryString.Length - 1); | 773 | queryString = queryString.Substring(0, queryString.Length - 1); |
752 | 774 | ||