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.
This commit is contained in:
Melanie
2009-09-22 17:04:34 +01:00
parent dafe5bf05f
commit 97c18caa76
6 changed files with 287 additions and 47 deletions

View File

@@ -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()

View File

@@ -201,7 +201,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
void llGroundRepel(double height, int water, double tau);
LSL_Vector llGroundSlope(LSL_Vector offset);
LSL_String llHTTPRequest(string url, LSL_List parameters, string body);
void llHTTPResponse(string url, int status, string body);
void llHTTPResponse(LSL_Key id, int status, string body);
LSL_String llInsertString(string dst, int position, string src);
void llInstantMessage(string user, string message);
LSL_String llIntegerToBase64(int number);

View File

@@ -864,9 +864,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
return m_LSL_Functions.llHTTPRequest(url, parameters, body);
}
public void llHTTPResponse(string url, int status, string body)
public void llHTTPResponse(LSL_Key id, int status, string body)
{
m_LSL_Functions.llHTTPResponse(url, status, body);
m_LSL_Functions.llHTTPResponse(id, status, body);
}
public LSL_String llInsertString(string dst, int position, string src)