From 188bdfc87860dbd5d6d616337c203c55c7a0b80a Mon Sep 17 00:00:00 2001 From: Tom Date: Sat, 29 Jan 2011 12:45:53 -0800 Subject: Ignore duplicate llHTTPResponse calls to the same request. Prevents response corruption. Only the first llHTTPResponse call is obeyed, akin to SL. --- OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs b/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs index b83eb90..4851b33 100644 --- a/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs @@ -48,6 +48,7 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp public string url; public UUID urlcode; public Dictionary<UUID, RequestData> requests; + public bool responseSent; } public class RequestData @@ -199,10 +200,14 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp if (m_RequestMap.ContainsKey(request)) { UrlData urlData = m_RequestMap[request]; - urlData.requests[request].responseCode = status; - urlData.requests[request].responseBody = body; - //urlData.requests[request].ev.Set(); - urlData.requests[request].requestDone =true; + if (!urlData.responseSent) + { + urlData.requests[request].responseCode = status; + urlData.requests[request].responseBody = body; + //urlData.requests[request].ev.Set(); + urlData.requests[request].requestDone = true; + urlData.responseSent = true; + } } else { -- cgit v1.1