* 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
This commit is contained in:
lbsa71
2007-07-04 14:12:32 +00:00
parent 9a51949cb4
commit 6a2588454a
16 changed files with 503 additions and 591 deletions

View File

@@ -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;
}
}
}