From 6a2588454a1ac4bb484ad0b9ee648e9ac156f8db Mon Sep 17 00:00:00 2001 From: lbsa71 Date: Wed, 4 Jul 2007 14:12:32 +0000 Subject: * Removed AssetHttpServer, using BaseHttpServer instead * Removed legacy REST handling * Created two custom IStreamHandlers for asset up/download * Removed quite a lot of double and triple encodings, trying to work towards binary only and direct write into storage. * Introduced BaseStreamHandler with GetParam() and some other goodies --- OpenSim/Framework/Servers/BaseStreamHandler.cs | 40 ++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 OpenSim/Framework/Servers/BaseStreamHandler.cs (limited to 'OpenSim/Framework/Servers/BaseStreamHandler.cs') diff --git a/OpenSim/Framework/Servers/BaseStreamHandler.cs b/OpenSim/Framework/Servers/BaseStreamHandler.cs new file mode 100644 index 0000000..95e9707 --- /dev/null +++ b/OpenSim/Framework/Servers/BaseStreamHandler.cs @@ -0,0 +1,40 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.IO; + +namespace OpenSim.Framework.Servers +{ + public abstract class BaseStreamHandler : IStreamHandler + { + public string ContentType + { + get { return "application/xml"; } + } + + private string m_httpMethod; + public string HttpMethod + { + get { return m_httpMethod; } + } + + private string m_path; + public string Path + { + get { return m_path; } + } + + protected string GetParam( string path ) + { + return path.Substring( m_path.Length ); + } + + public abstract byte[] Handle(string path, Stream request); + + protected BaseStreamHandler(string path, string httpMethod ) + { + m_httpMethod = httpMethod; + m_path = path; + } + } +} -- cgit v1.1 From 5c32b33a66fbdf371d53d85ee54ee8e837481570 Mon Sep 17 00:00:00 2001 From: lbsa71 Date: Wed, 4 Jul 2007 16:28:59 +0000 Subject: * re-fixed the utf-16 bug in xmlRpcResponse serialization * added LLSDStreamHandler.cs to Caps (Haven't enabled it yet, though) * removed last traces of old rest handling --- OpenSim/Framework/Servers/BaseStreamHandler.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'OpenSim/Framework/Servers/BaseStreamHandler.cs') diff --git a/OpenSim/Framework/Servers/BaseStreamHandler.cs b/OpenSim/Framework/Servers/BaseStreamHandler.cs index 95e9707..5fcf678 100644 --- a/OpenSim/Framework/Servers/BaseStreamHandler.cs +++ b/OpenSim/Framework/Servers/BaseStreamHandler.cs @@ -7,19 +7,19 @@ namespace OpenSim.Framework.Servers { public abstract class BaseStreamHandler : IStreamHandler { - public string ContentType + virtual public string ContentType { get { return "application/xml"; } } private string m_httpMethod; - public string HttpMethod + virtual public string HttpMethod { get { return m_httpMethod; } } private string m_path; - public string Path + virtual public string Path { get { return m_path; } } -- cgit v1.1 From 9f5f65c8477e3d05f384bafbb1bdf6dcb3f577c8 Mon Sep 17 00:00:00 2001 From: lbsa71 Date: Mon, 9 Jul 2007 23:32:29 +0000 Subject: * LLSDStreamhandler now works. --- OpenSim/Framework/Servers/BaseStreamHandler.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Framework/Servers/BaseStreamHandler.cs') diff --git a/OpenSim/Framework/Servers/BaseStreamHandler.cs b/OpenSim/Framework/Servers/BaseStreamHandler.cs index 5fcf678..0d9c674 100644 --- a/OpenSim/Framework/Servers/BaseStreamHandler.cs +++ b/OpenSim/Framework/Servers/BaseStreamHandler.cs @@ -31,7 +31,7 @@ namespace OpenSim.Framework.Servers public abstract byte[] Handle(string path, Stream request); - protected BaseStreamHandler(string path, string httpMethod ) + protected BaseStreamHandler(string httpMethod, string path) { m_httpMethod = httpMethod; m_path = path; -- cgit v1.1