mirror of
https://github.com/opensim/opensim.git
synced 2026-08-04 08:06:27 +08:00
* Added a streamhandler that does streams both in and out
* The RestDeserialisehandler now does streams and returns an object instead of string
This commit is contained in:
@@ -30,38 +30,12 @@ using System.IO;
|
||||
|
||||
namespace OpenSim.Framework.Servers
|
||||
{
|
||||
public abstract class BaseStreamHandler : IStreamHandler
|
||||
public abstract class BaseStreamHandler : BaseRequestHandler, IStreamedRequestHandler
|
||||
{
|
||||
public virtual string ContentType
|
||||
{
|
||||
get { return "application/xml"; }
|
||||
}
|
||||
|
||||
private string m_httpMethod;
|
||||
|
||||
public virtual string HttpMethod
|
||||
{
|
||||
get { return m_httpMethod; }
|
||||
}
|
||||
|
||||
private string m_path;
|
||||
|
||||
public virtual 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 httpMethod, string path)
|
||||
protected BaseStreamHandler(string httpMethod, string path) : base(httpMethod, path)
|
||||
{
|
||||
m_httpMethod = httpMethod;
|
||||
m_path = path;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user