* 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:
lbsa71
2007-07-04 16:28:59 +00:00
parent 6a2588454a
commit 5c32b33a66
17 changed files with 387 additions and 490 deletions

View File

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