diff options
author | Melanie | 2009-09-22 17:04:34 +0100 |
---|---|---|
committer | Melanie | 2009-09-22 17:04:34 +0100 |
commit | 97c18caa766e2dd72b152b78827ef554f2054f8c (patch) | |
tree | a15d21864c95dbfecc2c6eafb3b74dd59f830b0a /OpenSim/Region/ScriptEngine/Shared | |
parent | Completely remove the prior implementation of the request event handling (diff) | |
download | opensim-SC_OLD-97c18caa766e2dd72b152b78827ef554f2054f8c.zip opensim-SC_OLD-97c18caa766e2dd72b152b78827ef554f2054f8c.tar.gz opensim-SC_OLD-97c18caa766e2dd72b152b78827ef554f2054f8c.tar.bz2 opensim-SC_OLD-97c18caa766e2dd72b152b78827ef554f2054f8c.tar.xz |
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.
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared')
3 files changed, 12 insertions, 8 deletions
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 | |||
7838 | public LSL_String llGetHTTPHeader(LSL_Key request_id, string header) | 7838 | public LSL_String llGetHTTPHeader(LSL_Key request_id, string header) |
7839 | { | 7839 | { |
7840 | m_host.AddScriptLPS(1); | 7840 | m_host.AddScriptLPS(1); |
7841 | NotImplemented("llGetHTTPHeader"); | 7841 | |
7842 | return String.Empty; | 7842 | if (m_UrlModule != null) |
7843 | return m_UrlModule.GetHttpHeader(new UUID(request_id), header); | ||
7844 | return String.Empty; | ||
7843 | } | 7845 | } |
7844 | 7846 | ||
7845 | 7847 | ||
@@ -9117,13 +9119,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
9117 | } | 9119 | } |
9118 | 9120 | ||
9119 | 9121 | ||
9120 | public void llHTTPResponse(string url, int status, string body) | 9122 | public void llHTTPResponse(LSL_Key id, int status, string body) |
9121 | { | 9123 | { |
9122 | // Partial implementation: support for parameter flags needed | 9124 | // Partial implementation: support for parameter flags needed |
9123 | // see http://wiki.secondlife.com/wiki/llHTTPResponse | 9125 | // see http://wiki.secondlife.com/wiki/llHTTPResponse |
9124 | 9126 | ||
9125 | m_host.AddScriptLPS(1); | 9127 | m_host.AddScriptLPS(1); |
9126 | NotImplemented("llHTTPResponse"); | 9128 | |
9129 | if (m_UrlModule != null) | ||
9130 | m_UrlModule.HttpResponse(new UUID(id), status,body); | ||
9127 | } | 9131 | } |
9128 | 9132 | ||
9129 | public void llResetLandBanList() | 9133 | public void llResetLandBanList() |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs index 41358e5..a74e8da 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs | |||
@@ -201,7 +201,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces | |||
201 | void llGroundRepel(double height, int water, double tau); | 201 | void llGroundRepel(double height, int water, double tau); |
202 | LSL_Vector llGroundSlope(LSL_Vector offset); | 202 | LSL_Vector llGroundSlope(LSL_Vector offset); |
203 | LSL_String llHTTPRequest(string url, LSL_List parameters, string body); | 203 | LSL_String llHTTPRequest(string url, LSL_List parameters, string body); |
204 | void llHTTPResponse(string url, int status, string body); | 204 | void llHTTPResponse(LSL_Key id, int status, string body); |
205 | LSL_String llInsertString(string dst, int position, string src); | 205 | LSL_String llInsertString(string dst, int position, string src); |
206 | void llInstantMessage(string user, string message); | 206 | void llInstantMessage(string user, string message); |
207 | LSL_String llIntegerToBase64(int number); | 207 | LSL_String llIntegerToBase64(int number); |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs index 02ae281..a28e97b 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs | |||
@@ -864,9 +864,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
864 | return m_LSL_Functions.llHTTPRequest(url, parameters, body); | 864 | return m_LSL_Functions.llHTTPRequest(url, parameters, body); |
865 | } | 865 | } |
866 | 866 | ||
867 | public void llHTTPResponse(string url, int status, string body) | 867 | public void llHTTPResponse(LSL_Key id, int status, string body) |
868 | { | 868 | { |
869 | m_LSL_Functions.llHTTPResponse(url, status, body); | 869 | m_LSL_Functions.llHTTPResponse(id, status, body); |
870 | } | 870 | } |
871 | 871 | ||
872 | public LSL_String llInsertString(string dst, int position, string src) | 872 | public LSL_String llInsertString(string dst, int position, string src) |