diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/Servers/BaseHttpServer.cs | 3 | ||||
-rw-r--r-- | OpenSim/Framework/Servers/IStreamHandler.cs | 1 | ||||
-rw-r--r-- | OpenSim/Framework/Servers/RestDeserialiseHandler.cs | 17 |
3 files changed, 8 insertions, 13 deletions
diff --git a/OpenSim/Framework/Servers/BaseHttpServer.cs b/OpenSim/Framework/Servers/BaseHttpServer.cs index a4a7b2b..e645e7b 100644 --- a/OpenSim/Framework/Servers/BaseHttpServer.cs +++ b/OpenSim/Framework/Servers/BaseHttpServer.cs | |||
@@ -107,11 +107,10 @@ namespace OpenSim.Framework.Servers | |||
107 | { | 107 | { |
108 | IStreamedRequestHandler streamedRequestHandler = requestHandler as IStreamedRequestHandler; | 108 | IStreamedRequestHandler streamedRequestHandler = requestHandler as IStreamedRequestHandler; |
109 | buffer = streamedRequestHandler.Handle(path, request.InputStream); | 109 | buffer = streamedRequestHandler.Handle(path, request.InputStream); |
110 | |||
111 | } | 110 | } |
112 | else | 111 | else |
113 | { | 112 | { |
114 | IStreamHandler streamHandler = (IStreamHandler)requestHandler; | 113 | IStreamHandler streamHandler = (IStreamHandler) requestHandler; |
115 | 114 | ||
116 | using (MemoryStream memoryStream = new MemoryStream()) | 115 | using (MemoryStream memoryStream = new MemoryStream()) |
117 | { | 116 | { |
diff --git a/OpenSim/Framework/Servers/IStreamHandler.cs b/OpenSim/Framework/Servers/IStreamHandler.cs index 6dc7189..c87937a 100644 --- a/OpenSim/Framework/Servers/IStreamHandler.cs +++ b/OpenSim/Framework/Servers/IStreamHandler.cs | |||
@@ -53,5 +53,4 @@ namespace OpenSim.Framework.Servers | |||
53 | // Handle request stream, return byte array | 53 | // Handle request stream, return byte array |
54 | void Handle(string path, Stream request, Stream response); | 54 | void Handle(string path, Stream request, Stream response); |
55 | } | 55 | } |
56 | |||
57 | } \ No newline at end of file | 56 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/Servers/RestDeserialiseHandler.cs b/OpenSim/Framework/Servers/RestDeserialiseHandler.cs index 28084e2..adf5c3f 100644 --- a/OpenSim/Framework/Servers/RestDeserialiseHandler.cs +++ b/OpenSim/Framework/Servers/RestDeserialiseHandler.cs | |||
@@ -1,6 +1,3 @@ | |||
1 | using System; | ||
2 | using System.Collections.Generic; | ||
3 | using System.Text; | ||
4 | using System.IO; | 1 | using System.IO; |
5 | using System.Xml; | 2 | using System.Xml; |
6 | using System.Xml.Serialization; | 3 | using System.Xml.Serialization; |
@@ -20,22 +17,22 @@ namespace OpenSim.Framework.Servers | |||
20 | m_method = method; | 17 | m_method = method; |
21 | } | 18 | } |
22 | 19 | ||
23 | public void Handle(string path, Stream request, Stream responseStream ) | 20 | public void Handle(string path, Stream request, Stream responseStream) |
24 | { | 21 | { |
25 | TRequest deserial; | 22 | TRequest deserial; |
26 | using (XmlTextReader xmlReader = new XmlTextReader(request)) | 23 | using (XmlTextReader xmlReader = new XmlTextReader(request)) |
27 | { | 24 | { |
28 | XmlSerializer deserializer = new XmlSerializer(typeof(TRequest)); | 25 | XmlSerializer deserializer = new XmlSerializer(typeof (TRequest)); |
29 | deserial = (TRequest)deserializer.Deserialize(xmlReader); | 26 | deserial = (TRequest) deserializer.Deserialize(xmlReader); |
30 | } | 27 | } |
31 | 28 | ||
32 | TResponse response = m_method(deserial); | 29 | TResponse response = m_method(deserial); |
33 | 30 | ||
34 | using (XmlWriter xmlWriter = XmlTextWriter.Create( responseStream )) | 31 | using (XmlWriter xmlWriter = XmlTextWriter.Create(responseStream)) |
35 | { | 32 | { |
36 | XmlSerializer serializer = new XmlSerializer(typeof(TResponse)); | 33 | XmlSerializer serializer = new XmlSerializer(typeof (TResponse)); |
37 | serializer.Serialize(xmlWriter, response ); | 34 | serializer.Serialize(xmlWriter, response); |
38 | } | 35 | } |
39 | } | 36 | } |
40 | } | 37 | } |
41 | } | 38 | } \ No newline at end of file |