mirror of
https://github.com/opensim/opensim.git
synced 2026-06-26 16:55:38 +08:00
Added the ability to set User-Agent in llHTTPRequest. No new default value has been set since having no User-Agent seems to work well but the facility is now available to set this if required. Using something based on the pattern of SLs User-Agent may well cause problems, not all web servers respond well to it. See the notes in the SL Wiki http://wiki.secondlife.com/wiki/LlHTTPRequest
Fixes Mantis #3143
This commit is contained in:
@@ -358,7 +358,10 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest
|
||||
}
|
||||
|
||||
foreach (KeyValuePair<string, string> entry in ResponseHeaders)
|
||||
Request.Headers[entry.Key] = entry.Value;
|
||||
if (entry.Key.ToLower().Equals("user-agent"))
|
||||
Request.UserAgent = entry.Value;
|
||||
else
|
||||
Request.Headers[entry.Key] = entry.Value;
|
||||
|
||||
// Encode outbound data
|
||||
if (OutboundBody.Length > 0)
|
||||
|
||||
Reference in New Issue
Block a user