mirror of
https://github.com/opensim/opensim.git
synced 2026-08-01 06:06:06 +08:00
* 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
This commit is contained in:
@@ -2,40 +2,9 @@ using System.Collections;
|
||||
using System.Text;
|
||||
using libsecondlife;
|
||||
using OpenSim.Region.Capabilities;
|
||||
using System.IO;
|
||||
|
||||
namespace OpenSim.Framework.Servers
|
||||
{
|
||||
public class LlsdMethodEntry<TResponse, TRequest> : ILlsdMethodHandler
|
||||
where TRequest : new()
|
||||
{
|
||||
private LlsdMethod<TResponse, TRequest> m_method;
|
||||
|
||||
|
||||
public LlsdMethodEntry( )
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public LlsdMethodEntry(LlsdMethod<TResponse, TRequest> method)
|
||||
{
|
||||
m_method = method;
|
||||
}
|
||||
|
||||
#region ILlsdMethodHandler Members
|
||||
|
||||
public string Handle(string body, string path)
|
||||
{
|
||||
Encoding _enc = Encoding.UTF8;
|
||||
Hashtable hash = (Hashtable)LLSD.LLSDDeserialize(_enc.GetBytes( body ));
|
||||
TRequest request = new TRequest();
|
||||
|
||||
LLSDHelpers.DeserialiseLLSDMap(hash, request );
|
||||
|
||||
TResponse response = m_method(request);
|
||||
|
||||
return LLSDHelpers.SerialiseLLSDReply( response );
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user