diff options
Diffstat (limited to 'OpenSim/Framework/WebUtil.cs')
-rw-r--r-- | OpenSim/Framework/WebUtil.cs | 60 |
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; | |||
39 | using System.Web; | 39 | using System.Web; |
40 | using System.Xml; | 40 | using System.Xml; |
41 | using System.Xml.Serialization; | 41 | using System.Xml.Serialization; |
42 | |||
43 | using log4net; | 42 | using log4net; |
44 | using OpenSim.Framework.Servers.HttpServer; | ||
45 | using OpenMetaverse.StructuredData; | 43 | using OpenMetaverse.StructuredData; |
46 | 44 | ||
47 | namespace OpenSim.Framework | 45 | namespace 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 |