blob: 0d9c6744005f92781ecc087229f096dfb16e9d2c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
namespace OpenSim.Framework.Servers
{
public abstract class BaseStreamHandler : IStreamHandler
{
virtual public string ContentType
{
get { return "application/xml"; }
}
private string m_httpMethod;
virtual public string HttpMethod
{
get { return m_httpMethod; }
}
private string m_path;
virtual 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 httpMethod, string path)
{
m_httpMethod = httpMethod;
m_path = path;
}
}
}
|