From 00791594ad4ed6d78bd6edbb2e02eaaf5c30c8ce Mon Sep 17 00:00:00 2001 From: Charles Krinke Date: Mon, 14 Jul 2008 13:51:54 +0000 Subject: Mantis#1739. Thank you kindly, Grumly57 for a patch that: Implements X-SecondLife-* HTTP Headers for llHTTPRequest --- .../ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/ScriptEngine/Shared/Api') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 06a6086..507a132 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -6648,8 +6648,24 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { param.Add(o.ToString()); } + + Dictionary httpHeaders = new Dictionary(); + + httpHeaders["X-SecondLife-Shard"] = "OpenSim"; + httpHeaders["X-SecondLife-Object-Name"] = m_host.Name; + httpHeaders["X-SecondLife-Object-Key"] = m_itemID.ToString(); + httpHeaders["X-SecondLife-Region"] = World.RegionInfo.RegionName; + httpHeaders["X-SecondLife-Local-Position"] = m_host.AbsolutePosition.ToString(); + httpHeaders["X-SecondLife-Local-Velocity"] = m_host.Velocity.ToString(); + httpHeaders["X-SecondLife-Local-Rotation"] = m_host.RotationOffset.ToString(); + + ScenePresence scenePresence = World.GetScenePresence(m_host.ObjectOwner); + httpHeaders["X-SecondLife-Owner-Name"] = scenePresence == null ? string.Empty : scenePresence.Name; + + httpHeaders["X-SecondLife-Owner-Key"] = m_host.ObjectOwner.ToString(); + LLUUID reqID = httpScriptMod. - StartHttpRequest(m_localID, m_itemID, url, param, body); + StartHttpRequest(m_localID, m_itemID, url, param, httpHeaders, body); if (reqID != LLUUID.Zero) return reqID.ToString(); -- cgit v1.1