aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Servers/BaseHttpServer.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework/Servers/BaseHttpServer.cs')
-rw-r--r--OpenSim/Framework/Servers/BaseHttpServer.cs19
1 files changed, 10 insertions, 9 deletions
diff --git a/OpenSim/Framework/Servers/BaseHttpServer.cs b/OpenSim/Framework/Servers/BaseHttpServer.cs
index 5dc1f56..713793c 100644
--- a/OpenSim/Framework/Servers/BaseHttpServer.cs
+++ b/OpenSim/Framework/Servers/BaseHttpServer.cs
@@ -26,13 +26,14 @@
26* 26*
27*/ 27*/
28using System; 28using System;
29using System.Collections;
29using System.Collections.Generic; 30using System.Collections.Generic;
31using System.IO;
30using System.Net; 32using System.Net;
31using System.Text; 33using System.Text;
32using System.Text.RegularExpressions; 34using System.Text.RegularExpressions;
33using System.Threading; 35using System.Threading;
34using Nwc.XmlRpc; 36using Nwc.XmlRpc;
35using System.Collections;
36using OpenSim.Framework.Console; 37using OpenSim.Framework.Console;
37 38
38namespace OpenSim.Framework.Servers 39namespace OpenSim.Framework.Servers
@@ -199,9 +200,9 @@ namespace OpenSim.Framework.Servers
199 response.KeepAlive = false; 200 response.KeepAlive = false;
200 response.SendChunked = false; 201 response.SendChunked = false;
201 202
202 System.IO.Stream body = request.InputStream; 203 Stream body = request.InputStream;
203 System.Text.Encoding encoding = System.Text.Encoding.UTF8; 204 Encoding encoding = Encoding.UTF8;
204 System.IO.StreamReader reader = new System.IO.StreamReader(body, encoding); 205 StreamReader reader = new StreamReader(body, encoding);
205 206
206 string requestBody = reader.ReadToEnd(); 207 string requestBody = reader.ReadToEnd();
207 body.Close(); 208 body.Close();
@@ -245,8 +246,8 @@ namespace OpenSim.Framework.Servers
245 246
246 } 247 }
247 248
248 byte[] buffer = System.Text.Encoding.UTF8.GetBytes(responseString); 249 byte[] buffer = Encoding.UTF8.GetBytes(responseString);
249 System.IO.Stream output = response.OutputStream; 250 Stream output = response.OutputStream;
250 response.SendChunked = false; 251 response.SendChunked = false;
251 response.ContentLength64 = buffer.Length; 252 response.ContentLength64 = buffer.Length;
252 output.Write(buffer, 0, buffer.Length); 253 output.Write(buffer, 0, buffer.Length);
@@ -260,7 +261,7 @@ namespace OpenSim.Framework.Servers
260 261
261 public void Start() 262 public void Start()
262 { 263 {
263 OpenSim.Framework.Console.MainLog.Instance.WriteLine(LogPriority.LOW, "BaseHttpServer.cs: Starting up HTTP Server"); 264 MainLog.Instance.WriteLine(LogPriority.LOW, "BaseHttpServer.cs: Starting up HTTP Server");
264 265
265 m_workerThread = new Thread(new ThreadStart(StartHTTP)); 266 m_workerThread = new Thread(new ThreadStart(StartHTTP));
266 m_workerThread.IsBackground = true; 267 m_workerThread.IsBackground = true;
@@ -271,7 +272,7 @@ namespace OpenSim.Framework.Servers
271 { 272 {
272 try 273 try
273 { 274 {
274 OpenSim.Framework.Console.MainLog.Instance.WriteLine(LogPriority.LOW, "BaseHttpServer.cs: StartHTTP() - Spawned main thread OK"); 275 MainLog.Instance.WriteLine(LogPriority.LOW, "BaseHttpServer.cs: StartHTTP() - Spawned main thread OK");
275 m_httpListener = new HttpListener(); 276 m_httpListener = new HttpListener();
276 277
277 m_httpListener.Prefixes.Add("http://+:" + m_port + "/"); 278 m_httpListener.Prefixes.Add("http://+:" + m_port + "/");
@@ -286,7 +287,7 @@ namespace OpenSim.Framework.Servers
286 } 287 }
287 catch (Exception e) 288 catch (Exception e)
288 { 289 {
289 OpenSim.Framework.Console.MainLog.Instance.WriteLine(LogPriority.MEDIUM, e.Message); 290 MainLog.Instance.WriteLine(LogPriority.MEDIUM, e.Message);
290 } 291 }
291 } 292 }
292 293