aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Servers
diff options
context:
space:
mode:
authorlbsa712007-11-01 19:19:05 +0000
committerlbsa712007-11-01 19:19:05 +0000
commit4fad66f855544b9298ae2216c58c0f44009358a5 (patch)
tree07747305928e0072230b31c399d8a7e76442b77f /OpenSim/Framework/Servers
parentPartialy fixed a bug with collisions in BulletXPlugin. (diff)
downloadopensim-SC_OLD-4fad66f855544b9298ae2216c58c0f44009358a5.zip
opensim-SC_OLD-4fad66f855544b9298ae2216c58c0f44009358a5.tar.gz
opensim-SC_OLD-4fad66f855544b9298ae2216c58c0f44009358a5.tar.bz2
opensim-SC_OLD-4fad66f855544b9298ae2216c58c0f44009358a5.tar.xz
* Diuerse beavtificatems
Diffstat (limited to 'OpenSim/Framework/Servers')
-rw-r--r--OpenSim/Framework/Servers/BaseHttpServer.cs3
-rw-r--r--OpenSim/Framework/Servers/IStreamHandler.cs1
-rw-r--r--OpenSim/Framework/Servers/RestDeserialiseHandler.cs17
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 @@
1using System;
2using System.Collections.Generic;
3using System.Text;
4using System.IO; 1using System.IO;
5using System.Xml; 2using System.Xml;
6using System.Xml.Serialization; 3using 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