aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/Scripting/HttpRequest
diff options
context:
space:
mode:
authoridb2009-03-07 12:58:00 +0000
committeridb2009-03-07 12:58:00 +0000
commit23b247c519460a64ba3c089f15d548cbbcbd06db (patch)
tree0efafa153ee26e9877c05e16d3fe08833128d0b1 /OpenSim/Region/CoreModules/Scripting/HttpRequest
parentCorrect casts so that the target id in the at_target event matches the origin... (diff)
downloadopensim-SC_OLD-23b247c519460a64ba3c089f15d548cbbcbd06db.zip
opensim-SC_OLD-23b247c519460a64ba3c089f15d548cbbcbd06db.tar.gz
opensim-SC_OLD-23b247c519460a64ba3c089f15d548cbbcbd06db.tar.bz2
opensim-SC_OLD-23b247c519460a64ba3c089f15d548cbbcbd06db.tar.xz
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
Diffstat (limited to 'OpenSim/Region/CoreModules/Scripting/HttpRequest')
-rw-r--r--OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs5
1 files changed, 4 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)