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 --- .../Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs') diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs index 4106fbb..6eb8749 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs @@ -6868,8 +6868,24 @@ namespace OpenSim.Region.ScriptEngine.Common { 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