diff options
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs | 5 | ||||
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs b/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs index 7142103..bdaecc5 100644 --- a/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs +++ b/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs | |||
@@ -358,7 +358,10 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest | |||
358 | } | 358 | } |
359 | 359 | ||
360 | foreach (KeyValuePair<string, string> entry in ResponseHeaders) | 360 | foreach (KeyValuePair<string, string> entry in ResponseHeaders) |
361 | Request.Headers[entry.Key] = entry.Value; | 361 | if (entry.Key.ToLower().Equals("user-agent")) |
362 | Request.UserAgent = entry.Value; | ||
363 | else | ||
364 | Request.Headers[entry.Key] = entry.Value; | ||
362 | 365 | ||
363 | // Encode outbound data | 366 | // Encode outbound data |
364 | if (OutboundBody.Length > 0) | 367 | if (OutboundBody.Length > 0) |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 0908cd6..6bb0fe9 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -8726,6 +8726,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
8726 | httpHeaders["X-SecondLife-Local-Rotation"] = string.Format("({0:0.000000}, {1:0.000000}, {2:0.000000}, {3:0.000000})", rotation.X, rotation.Y, rotation.Z, rotation.W); | 8726 | httpHeaders["X-SecondLife-Local-Rotation"] = string.Format("({0:0.000000}, {1:0.000000}, {2:0.000000}, {3:0.000000})", rotation.X, rotation.Y, rotation.Z, rotation.W); |
8727 | httpHeaders["X-SecondLife-Owner-Name"] = scenePresence == null ? string.Empty : scenePresence.ControllingClient.Name; | 8727 | httpHeaders["X-SecondLife-Owner-Name"] = scenePresence == null ? string.Empty : scenePresence.ControllingClient.Name; |
8728 | httpHeaders["X-SecondLife-Owner-Key"] = m_host.ObjectOwner.ToString(); | 8728 | httpHeaders["X-SecondLife-Owner-Key"] = m_host.ObjectOwner.ToString(); |
8729 | string userAgent = config.Configs["Network"].GetString("user_agent", null); | ||
8730 | if (userAgent != null) | ||
8731 | httpHeaders["User-Agent"] = userAgent; | ||
8729 | 8732 | ||
8730 | UUID reqID = httpScriptMod. | 8733 | UUID reqID = httpScriptMod. |
8731 | StartHttpRequest(m_localID, m_itemID, url, param, httpHeaders, body); | 8734 | StartHttpRequest(m_localID, m_itemID, url, param, httpHeaders, body); |