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:
idb
2009-03-07 12:58:00 +00:00
parent 1fd57b39df
commit 23b247c519
3 changed files with 14 additions and 2 deletions

View File

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