aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Servers/RestStreamHandler.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework/Servers/RestStreamHandler.cs')
-rw-r--r--OpenSim/Framework/Servers/RestStreamHandler.cs14
1 files changed, 6 insertions, 8 deletions
diff --git a/OpenSim/Framework/Servers/RestStreamHandler.cs b/OpenSim/Framework/Servers/RestStreamHandler.cs
index 1b1876e..0450387 100644
--- a/OpenSim/Framework/Servers/RestStreamHandler.cs
+++ b/OpenSim/Framework/Servers/RestStreamHandler.cs
@@ -26,18 +26,16 @@
26* 26*
27*/ 27*/
28 28
29using System;
30using System.Collections.Generic;
31using System.Text;
32using System.IO; 29using System.IO;
30using System.Text;
33 31
34namespace OpenSim.Framework.Servers 32namespace OpenSim.Framework.Servers
35{ 33{
36 public class RestStreamHandler : BaseStreamHandler 34 public class RestStreamHandler : BaseStreamHandler
37 { 35 {
38 RestMethod m_restMethod; 36 private RestMethod m_restMethod;
39 37
40 override public byte[] Handle(string path, Stream request ) 38 public override byte[] Handle(string path, Stream request)
41 { 39 {
42 Encoding encoding = Encoding.UTF8; 40 Encoding encoding = Encoding.UTF8;
43 StreamReader streamReader = new StreamReader(request, encoding); 41 StreamReader streamReader = new StreamReader(request, encoding);
@@ -46,14 +44,14 @@ namespace OpenSim.Framework.Servers
46 streamReader.Close(); 44 streamReader.Close();
47 45
48 string param = GetParam(path); 46 string param = GetParam(path);
49 string responseString = m_restMethod(requestBody, path, param ); 47 string responseString = m_restMethod(requestBody, path, param);
50 48
51 return Encoding.UTF8.GetBytes(responseString); 49 return Encoding.UTF8.GetBytes(responseString);
52 } 50 }
53 51
54 public RestStreamHandler(string httpMethod, string path, RestMethod restMethod) : base( httpMethod, path ) 52 public RestStreamHandler(string httpMethod, string path, RestMethod restMethod) : base(httpMethod, path)
55 { 53 {
56 m_restMethod = restMethod; 54 m_restMethod = restMethod;
57 } 55 }
58 } 56 }
59} 57} \ No newline at end of file