From 97c18caa766e2dd72b152b78827ef554f2054f8c Mon Sep 17 00:00:00 2001 From: Melanie Date: Tue, 22 Sep 2009 17:04:34 +0100 Subject: Thank you, Intari, for a patch that implements the missing pieces of Http-in and makes the host name for URL generation configurable. Applied with changes: llGetSimulatorHostname was not changed, because the change breaks existing behavior and carries a data exposure risk. That value needs to be configurable, the proposed fixed change is not acceptable. --- .../ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 02be983..b631478 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -7838,8 +7838,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_String llGetHTTPHeader(LSL_Key request_id, string header) { m_host.AddScriptLPS(1); - NotImplemented("llGetHTTPHeader"); - return String.Empty; + + if (m_UrlModule != null) + return m_UrlModule.GetHttpHeader(new UUID(request_id), header); + return String.Empty; } @@ -9117,13 +9119,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api } - public void llHTTPResponse(string url, int status, string body) + public void llHTTPResponse(LSL_Key id, int status, string body) { // Partial implementation: support for parameter flags needed // see http://wiki.secondlife.com/wiki/llHTTPResponse - m_host.AddScriptLPS(1); - NotImplemented("llHTTPResponse"); + m_host.AddScriptLPS(1); + + if (m_UrlModule != null) + m_UrlModule.HttpResponse(new UUID(id), status,body); } public void llResetLandBanList() -- cgit v1.1 From 9c2ffa8f2e49aa70e0b2c6afff875bbdb84ba0dc Mon Sep 17 00:00:00 2001 From: Teravus Ovares (Dan Olivares) Date: Wed, 23 Sep 2009 14:55:22 -0400 Subject: * fix endlines in LSL_api.cs --- .../Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index b631478..4c52b11 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -24,7 +24,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - + using System; using System.Collections; using System.Collections.Generic; @@ -7838,8 +7838,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_String llGetHTTPHeader(LSL_Key request_id, string header) { m_host.AddScriptLPS(1); - - if (m_UrlModule != null) + + if (m_UrlModule != null) return m_UrlModule.GetHttpHeader(new UUID(request_id), header); return String.Empty; } @@ -9124,9 +9124,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api // Partial implementation: support for parameter flags needed // see http://wiki.secondlife.com/wiki/llHTTPResponse - m_host.AddScriptLPS(1); - - if (m_UrlModule != null) + m_host.AddScriptLPS(1); + + if (m_UrlModule != null) m_UrlModule.HttpResponse(new UUID(id), status,body); } -- cgit v1.1