diff options
Merge branch 'master' into careminster
Conflicts:
OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs
Diffstat (limited to 'OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs b/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs index da59eab..60b7190 100644 --- a/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs | |||
@@ -301,6 +301,21 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp | |||
301 | UrlData urlData = m_RequestMap[request]; | 301 | UrlData urlData = m_RequestMap[request]; |
302 | if (!urlData.requests[request].responseSent) | 302 | if (!urlData.requests[request].responseSent) |
303 | { | 303 | { |
304 | string responseBody = body; | ||
305 | if (urlData.requests[request].responseType.Equals("text/plain")) | ||
306 | { | ||
307 | string value; | ||
308 | if (urlData.requests[request].headers.TryGetValue("user-agent", out value)) | ||
309 | { | ||
310 | if (value != null && value.IndexOf("MSIE") >= 0) | ||
311 | { | ||
312 | // wrap the html escaped response if the target client is IE | ||
313 | // It ignores "text/plain" if the body is html | ||
314 | responseBody = "<html>" + System.Web.HttpUtility.HtmlEncode(body) + "</html>"; | ||
315 | } | ||
316 | } | ||
317 | } | ||
318 | |||
304 | urlData.requests[request].responseCode = status; | 319 | urlData.requests[request].responseCode = status; |
305 | urlData.requests[request].responseBody = body; | 320 | urlData.requests[request].responseBody = body; |
306 | //urlData.requests[request].ev.Set(); | 321 | //urlData.requests[request].ev.Set(); |