aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/WebUtil.cs
diff options
context:
space:
mode:
authorMelanie2011-10-26 01:27:24 +0100
committerMelanie2011-10-26 01:27:24 +0100
commitfd22159d0c7d7b149d35747cbaa436f3b1e6f579 (patch)
treebbe8cdc63dd1f98346a6afb844f4b4d3caf336a8 /OpenSim/Framework/WebUtil.cs
parentMerge commit 'e14cb45b9bc4c78300cb804833cb66c1c2e62187' into bigmerge (diff)
parentRestart the event queue worker threads that I accidentally disabled earlier t... (diff)
downloadopensim-SC-fd22159d0c7d7b149d35747cbaa436f3b1e6f579.zip
opensim-SC-fd22159d0c7d7b149d35747cbaa436f3b1e6f579.tar.gz
opensim-SC-fd22159d0c7d7b149d35747cbaa436f3b1e6f579.tar.bz2
opensim-SC-fd22159d0c7d7b149d35747cbaa436f3b1e6f579.tar.xz
Merge branch 'master' into bigmerge
Conflicts: OpenSim/Framework/Watchdog.cs
Diffstat (limited to 'OpenSim/Framework/WebUtil.cs')
-rw-r--r--OpenSim/Framework/WebUtil.cs60
1 files changed, 29 insertions, 31 deletions
diff --git a/OpenSim/Framework/WebUtil.cs b/OpenSim/Framework/WebUtil.cs
index 971c0b7..60c1e15 100644
--- a/OpenSim/Framework/WebUtil.cs
+++ b/OpenSim/Framework/WebUtil.cs
@@ -39,9 +39,7 @@ using System.Text;
39using System.Web; 39using System.Web;
40using System.Xml; 40using System.Xml;
41using System.Xml.Serialization; 41using System.Xml.Serialization;
42
43using log4net; 42using log4net;
44using OpenSim.Framework.Servers.HttpServer;
45using OpenMetaverse.StructuredData; 43using OpenMetaverse.StructuredData;
46 44
47namespace OpenSim.Framework 45namespace OpenSim.Framework
@@ -65,35 +63,35 @@ namespace OpenSim.Framework
65 // a "long" call for warning & debugging purposes 63 // a "long" call for warning & debugging purposes
66 public const int LongCallTime = 500; 64 public const int LongCallTime = 500;
67 65
68 /// <summary> 66// /// <summary>
69 /// Send LLSD to an HTTP client in application/llsd+json form 67// /// Send LLSD to an HTTP client in application/llsd+json form
70 /// </summary> 68// /// </summary>
71 /// <param name="response">HTTP response to send the data in</param> 69// /// <param name="response">HTTP response to send the data in</param>
72 /// <param name="body">LLSD to send to the client</param> 70// /// <param name="body">LLSD to send to the client</param>
73 public static void SendJSONResponse(OSHttpResponse response, OSDMap body) 71// public static void SendJSONResponse(OSHttpResponse response, OSDMap body)
74 { 72// {
75 byte[] responseData = Encoding.UTF8.GetBytes(OSDParser.SerializeJsonString(body)); 73// byte[] responseData = Encoding.UTF8.GetBytes(OSDParser.SerializeJsonString(body));
76 74//
77 response.ContentEncoding = Encoding.UTF8; 75// response.ContentEncoding = Encoding.UTF8;
78 response.ContentLength = responseData.Length; 76// response.ContentLength = responseData.Length;
79 response.ContentType = "application/llsd+json"; 77// response.ContentType = "application/llsd+json";
80 response.Body.Write(responseData, 0, responseData.Length); 78// response.Body.Write(responseData, 0, responseData.Length);
81 } 79// }
82 80//
83 /// <summary> 81// /// <summary>
84 /// Send LLSD to an HTTP client in application/llsd+xml form 82// /// Send LLSD to an HTTP client in application/llsd+xml form
85 /// </summary> 83// /// </summary>
86 /// <param name="response">HTTP response to send the data in</param> 84// /// <param name="response">HTTP response to send the data in</param>
87 /// <param name="body">LLSD to send to the client</param> 85// /// <param name="body">LLSD to send to the client</param>
88 public static void SendXMLResponse(OSHttpResponse response, OSDMap body) 86// public static void SendXMLResponse(OSHttpResponse response, OSDMap body)
89 { 87// {
90 byte[] responseData = OSDParser.SerializeLLSDXmlBytes(body); 88// byte[] responseData = OSDParser.SerializeLLSDXmlBytes(body);
91 89//
92 response.ContentEncoding = Encoding.UTF8; 90// response.ContentEncoding = Encoding.UTF8;
93 response.ContentLength = responseData.Length; 91// response.ContentLength = responseData.Length;
94 response.ContentType = "application/llsd+xml"; 92// response.ContentType = "application/llsd+xml";
95 response.Body.Write(responseData, 0, responseData.Length); 93// response.Body.Write(responseData, 0, responseData.Length);
96 } 94// }
97 95
98 /// <summary> 96 /// <summary>
99 /// Make a GET or GET-like request to a web service that returns LLSD 97 /// Make a GET or GET-like request to a web service that returns LLSD