From 8a0a78cbccce796addacab7ed1609279b802a9b3 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Tue, 25 Oct 2011 20:24:21 +0100
Subject: Make OpenSim.Framework.Servers.HttpServer rely on OpenSim.Framework
instead of the other way around.
This is necessary so that code in HttpServer can use framework facilities such as the thread watchdog for monitoring purposes.
Doing this shuffle meant that MainServer was moved into OpenSim/Framework/Servers
Also had to make OpenSim.Framework.Console rely on OpenSim.Framework rather than the other way around since it in turn relies on HttpServer
MainConsole and some new interfaces had to be moved into OpenSim/Framework to allow this. This can be reverted if parts of OpenSim.Framework stop relying on console presence (cheifly RegionInfo)
---
OpenSim/Framework/WebUtil.cs | 60 +++++++++++++++++++++-----------------------
1 file changed, 29 insertions(+), 31 deletions(-)
(limited to 'OpenSim/Framework/WebUtil.cs')
diff --git a/OpenSim/Framework/WebUtil.cs b/OpenSim/Framework/WebUtil.cs
index be7504f..cafa441 100644
--- a/OpenSim/Framework/WebUtil.cs
+++ b/OpenSim/Framework/WebUtil.cs
@@ -39,9 +39,7 @@ using System.Text;
using System.Web;
using System.Xml;
using System.Xml.Serialization;
-
using log4net;
-using OpenSim.Framework.Servers.HttpServer;
using OpenMetaverse.StructuredData;
namespace OpenSim.Framework
@@ -65,35 +63,35 @@ namespace OpenSim.Framework
// a "long" call for warning & debugging purposes
public const int LongCallTime = 500;
- ///
- /// Send LLSD to an HTTP client in application/llsd+json form
- ///
- /// HTTP response to send the data in
- /// LLSD to send to the client
- public static void SendJSONResponse(OSHttpResponse response, OSDMap body)
- {
- byte[] responseData = Encoding.UTF8.GetBytes(OSDParser.SerializeJsonString(body));
-
- response.ContentEncoding = Encoding.UTF8;
- response.ContentLength = responseData.Length;
- response.ContentType = "application/llsd+json";
- response.Body.Write(responseData, 0, responseData.Length);
- }
-
- ///
- /// Send LLSD to an HTTP client in application/llsd+xml form
- ///
- /// HTTP response to send the data in
- /// LLSD to send to the client
- public static void SendXMLResponse(OSHttpResponse response, OSDMap body)
- {
- byte[] responseData = OSDParser.SerializeLLSDXmlBytes(body);
-
- response.ContentEncoding = Encoding.UTF8;
- response.ContentLength = responseData.Length;
- response.ContentType = "application/llsd+xml";
- response.Body.Write(responseData, 0, responseData.Length);
- }
+// ///
+// /// Send LLSD to an HTTP client in application/llsd+json form
+// ///
+// /// HTTP response to send the data in
+// /// LLSD to send to the client
+// public static void SendJSONResponse(OSHttpResponse response, OSDMap body)
+// {
+// byte[] responseData = Encoding.UTF8.GetBytes(OSDParser.SerializeJsonString(body));
+//
+// response.ContentEncoding = Encoding.UTF8;
+// response.ContentLength = responseData.Length;
+// response.ContentType = "application/llsd+json";
+// response.Body.Write(responseData, 0, responseData.Length);
+// }
+//
+// ///
+// /// Send LLSD to an HTTP client in application/llsd+xml form
+// ///
+// /// HTTP response to send the data in
+// /// LLSD to send to the client
+// public static void SendXMLResponse(OSHttpResponse response, OSDMap body)
+// {
+// byte[] responseData = OSDParser.SerializeLLSDXmlBytes(body);
+//
+// response.ContentEncoding = Encoding.UTF8;
+// response.ContentLength = responseData.Length;
+// response.ContentType = "application/llsd+xml";
+// response.Body.Write(responseData, 0, responseData.Length);
+// }
///
/// Make a GET or GET-like request to a web service that returns LLSD
--
cgit v1.1