diff options
author | Sean Dague | 2007-07-30 20:11:40 +0000 |
---|---|---|
committer | Sean Dague | 2007-07-30 20:11:40 +0000 |
commit | 74bb5282a09ec095a7ff810c62f79cc64e187686 (patch) | |
tree | e0a9b703bfcbbab59b04351dd71508fa913e741a /OpenSim/Framework/Communications/Capabilities/LLSDStreamHandler.cs | |
parent | added OnDisconnectUser event to required classes (diff) | |
download | opensim-SC-74bb5282a09ec095a7ff810c62f79cc64e187686.zip opensim-SC-74bb5282a09ec095a7ff810c62f79cc64e187686.tar.gz opensim-SC-74bb5282a09ec095a7ff810c62f79cc64e187686.tar.bz2 opensim-SC-74bb5282a09ec095a7ff810c62f79cc64e187686.tar.xz |
mass update of files to have native line endings
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/Communications/Capabilities/LLSDStreamHandler.cs | 84 |
1 files changed, 42 insertions, 42 deletions
diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDStreamHandler.cs b/OpenSim/Framework/Communications/Capabilities/LLSDStreamHandler.cs index 7d99b6e..d98e23f 100644 --- a/OpenSim/Framework/Communications/Capabilities/LLSDStreamHandler.cs +++ b/OpenSim/Framework/Communications/Capabilities/LLSDStreamHandler.cs | |||
@@ -1,42 +1,42 @@ | |||
1 | using System; | 1 | using System; |
2 | using System.Collections.Generic; | 2 | using System.Collections.Generic; |
3 | using System.Text; | 3 | using System.Text; |
4 | using OpenSim.Framework.Servers; | 4 | using OpenSim.Framework.Servers; |
5 | using System.IO; | 5 | using System.IO; |
6 | using System.Collections; | 6 | using System.Collections; |
7 | using libsecondlife; | 7 | using libsecondlife; |
8 | 8 | ||
9 | namespace OpenSim.Region.Capabilities | 9 | namespace OpenSim.Region.Capabilities |
10 | { | 10 | { |
11 | public class LLSDStreamhandler<TRequest, TResponse> : BaseStreamHandler | 11 | public class LLSDStreamhandler<TRequest, TResponse> : BaseStreamHandler |
12 | where TRequest : new() | 12 | where TRequest : new() |
13 | { | 13 | { |
14 | private LLSDMethod<TRequest, TResponse> m_method; | 14 | private LLSDMethod<TRequest, TResponse> m_method; |
15 | 15 | ||
16 | public LLSDStreamhandler(string httpMethod, string path, LLSDMethod<TRequest, TResponse> method) | 16 | public LLSDStreamhandler(string httpMethod, string path, LLSDMethod<TRequest, TResponse> method) |
17 | : base(httpMethod, path ) | 17 | : base(httpMethod, path ) |
18 | { | 18 | { |
19 | m_method = method; | 19 | m_method = method; |
20 | } | 20 | } |
21 | 21 | ||
22 | public override byte[] Handle(string path, Stream request) | 22 | public override byte[] Handle(string path, Stream request) |
23 | { | 23 | { |
24 | //Encoding encoding = Encoding.UTF8; | 24 | //Encoding encoding = Encoding.UTF8; |
25 | //StreamReader streamReader = new StreamReader(request, false); | 25 | //StreamReader streamReader = new StreamReader(request, false); |
26 | 26 | ||
27 | //string requestBody = streamReader.ReadToEnd(); | 27 | //string requestBody = streamReader.ReadToEnd(); |
28 | //streamReader.Close(); | 28 | //streamReader.Close(); |
29 | 29 | ||
30 | Hashtable hash = (Hashtable)LLSD.LLSDDeserialize( request ); | 30 | Hashtable hash = (Hashtable)LLSD.LLSDDeserialize( request ); |
31 | TRequest llsdRequest = new TRequest(); | 31 | TRequest llsdRequest = new TRequest(); |
32 | LLSDHelpers.DeserialiseLLSDMap(hash, llsdRequest); | 32 | LLSDHelpers.DeserialiseLLSDMap(hash, llsdRequest); |
33 | 33 | ||
34 | TResponse response = m_method(llsdRequest); | 34 | TResponse response = m_method(llsdRequest); |
35 | 35 | ||
36 | Encoding encoding = new UTF8Encoding(false); | 36 | Encoding encoding = new UTF8Encoding(false); |
37 | 37 | ||
38 | return encoding.GetBytes( LLSDHelpers.SerialiseLLSDReply(response) ); | 38 | return encoding.GetBytes( LLSDHelpers.SerialiseLLSDReply(response) ); |
39 | 39 | ||
40 | } | 40 | } |
41 | } | 41 | } |
42 | } | 42 | } |