diff options
author | Sean Dague | 2007-07-16 15:40:11 +0000 |
---|---|---|
committer | Sean Dague | 2007-07-16 15:40:11 +0000 |
commit | 2a3c79df83e800d5dfe75a1a3b140ed81da2b1d6 (patch) | |
tree | e3f80ad51736cf17e856547b1bcf956010927434 /OpenSim/Framework/Servers/RestStreamHandler.cs | |
parent | *Trunk compiles now (diff) | |
download | opensim-SC-2a3c79df83e800d5dfe75a1a3b140ed81da2b1d6.zip opensim-SC-2a3c79df83e800d5dfe75a1a3b140ed81da2b1d6.tar.gz opensim-SC-2a3c79df83e800d5dfe75a1a3b140ed81da2b1d6.tar.bz2 opensim-SC-2a3c79df83e800d5dfe75a1a3b140ed81da2b1d6.tar.xz |
changed to native line ending encoding
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/Servers/RestStreamHandler.cs | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/OpenSim/Framework/Servers/RestStreamHandler.cs b/OpenSim/Framework/Servers/RestStreamHandler.cs index 1b3b41c..6753a06 100644 --- a/OpenSim/Framework/Servers/RestStreamHandler.cs +++ b/OpenSim/Framework/Servers/RestStreamHandler.cs | |||
@@ -1,31 +1,31 @@ | |||
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 System.IO; | 4 | using System.IO; |
5 | 5 | ||
6 | namespace OpenSim.Framework.Servers | 6 | namespace OpenSim.Framework.Servers |
7 | { | 7 | { |
8 | public class RestStreamHandler : BaseStreamHandler | 8 | public class RestStreamHandler : BaseStreamHandler |
9 | { | 9 | { |
10 | RestMethod m_restMethod; | 10 | RestMethod m_restMethod; |
11 | 11 | ||
12 | override public byte[] Handle(string path, Stream request ) | 12 | override public byte[] Handle(string path, Stream request ) |
13 | { | 13 | { |
14 | Encoding encoding = Encoding.UTF8; | 14 | Encoding encoding = Encoding.UTF8; |
15 | StreamReader streamReader = new StreamReader(request, encoding); | 15 | StreamReader streamReader = new StreamReader(request, encoding); |
16 | 16 | ||
17 | string requestBody = streamReader.ReadToEnd(); | 17 | string requestBody = streamReader.ReadToEnd(); |
18 | streamReader.Close(); | 18 | streamReader.Close(); |
19 | 19 | ||
20 | string param = GetParam(path); | 20 | string param = GetParam(path); |
21 | string responseString = m_restMethod(requestBody, path, param ); | 21 | string responseString = m_restMethod(requestBody, path, param ); |
22 | 22 | ||
23 | return Encoding.UTF8.GetBytes(responseString); | 23 | return Encoding.UTF8.GetBytes(responseString); |
24 | } | 24 | } |
25 | 25 | ||
26 | public RestStreamHandler(string httpMethod, string path, RestMethod restMethod) : base( httpMethod, path ) | 26 | public RestStreamHandler(string httpMethod, string path, RestMethod restMethod) : base( httpMethod, path ) |
27 | { | 27 | { |
28 | m_restMethod = restMethod; | 28 | m_restMethod = restMethod; |
29 | } | 29 | } |
30 | } | 30 | } |
31 | } | 31 | } |