mirror of
https://github.com/opensim/opensim.git
synced 2026-08-09 18:55:58 +08:00
adding OSHttpRequest and OSHttpResponse which wrap HttpListenerRequest and HttpListenerResponse respectively.
enhancing IStreamHandler and IStreamedHandler interfaces so that OSHttp{Request,Response} get passed in,
allowing RestHandlers to set response status code, redirections, etc.
This commit is contained in:
@@ -27,6 +27,7 @@
|
||||
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Net;
|
||||
|
||||
namespace OpenSim.Framework.Servers
|
||||
{
|
||||
@@ -39,7 +40,7 @@ namespace OpenSim.Framework.Servers
|
||||
get { return m_restMethod; }
|
||||
}
|
||||
|
||||
public override byte[] Handle(string path, Stream request)
|
||||
public override byte[] Handle(string path, Stream request, OSHttpRequest httpRequest, OSHttpResponse httpResponse)
|
||||
{
|
||||
Encoding encoding = Encoding.UTF8;
|
||||
StreamReader streamReader = new StreamReader(request, encoding);
|
||||
|
||||
Reference in New Issue
Block a user