From 4fad66f855544b9298ae2216c58c0f44009358a5 Mon Sep 17 00:00:00 2001 From: lbsa71 Date: Thu, 1 Nov 2007 19:19:05 +0000 Subject: * Diuerse beavtificatems --- OpenSim/Framework/Servers/BaseHttpServer.cs | 3 +-- OpenSim/Framework/Servers/IStreamHandler.cs | 1 - OpenSim/Framework/Servers/RestDeserialiseHandler.cs | 17 +++++++---------- 3 files changed, 8 insertions(+), 13 deletions(-) (limited to 'OpenSim/Framework/Servers') 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 { IStreamedRequestHandler streamedRequestHandler = requestHandler as IStreamedRequestHandler; buffer = streamedRequestHandler.Handle(path, request.InputStream); - } else { - IStreamHandler streamHandler = (IStreamHandler)requestHandler; + IStreamHandler streamHandler = (IStreamHandler) requestHandler; using (MemoryStream memoryStream = new MemoryStream()) { 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 // Handle request stream, return byte array void Handle(string path, Stream request, Stream response); } - } \ 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 @@ -using System; -using System.Collections.Generic; -using System.Text; using System.IO; using System.Xml; using System.Xml.Serialization; @@ -20,22 +17,22 @@ namespace OpenSim.Framework.Servers m_method = method; } - public void Handle(string path, Stream request, Stream responseStream ) + public void Handle(string path, Stream request, Stream responseStream) { TRequest deserial; using (XmlTextReader xmlReader = new XmlTextReader(request)) { - XmlSerializer deserializer = new XmlSerializer(typeof(TRequest)); - deserial = (TRequest)deserializer.Deserialize(xmlReader); + XmlSerializer deserializer = new XmlSerializer(typeof (TRequest)); + deserial = (TRequest) deserializer.Deserialize(xmlReader); } TResponse response = m_method(deserial); - using (XmlWriter xmlWriter = XmlTextWriter.Create( responseStream )) + using (XmlWriter xmlWriter = XmlTextWriter.Create(responseStream)) { - XmlSerializer serializer = new XmlSerializer(typeof(TResponse)); - serializer.Serialize(xmlWriter, response ); + XmlSerializer serializer = new XmlSerializer(typeof (TResponse)); + serializer.Serialize(xmlWriter, response); } } } -} +} \ No newline at end of file -- cgit v1.1