aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
diff options
context:
space:
mode:
authorDiva Canto2012-11-27 14:43:01 -0800
committerDiva Canto2012-11-27 14:43:01 -0800
commita82f699f4348ea1ab139ab338973c9cee04df712 (patch)
treed1bf4948670e1d207fe4f6c60f6b7771e1625839 /OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
parentPrevent the core Groups module from being enabled when its name doesn't match... (diff)
parentBulletSim: reorganize linear movement routine into separate subroutines enabl... (diff)
downloadopensim-SC_OLD-a82f699f4348ea1ab139ab338973c9cee04df712.zip
opensim-SC_OLD-a82f699f4348ea1ab139ab338973c9cee04df712.tar.gz
opensim-SC_OLD-a82f699f4348ea1ab139ab338973c9cee04df712.tar.bz2
opensim-SC_OLD-a82f699f4348ea1ab139ab338973c9cee04df712.tar.xz
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs')
-rw-r--r--OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs60
1 files changed, 5 insertions, 55 deletions
diff --git a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
index 410a76a..2cd626f 100644
--- a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
+++ b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
@@ -719,8 +719,11 @@ namespace OpenSim.Framework.Servers.HttpServer
719 if (DebugLevel == 5) 719 if (DebugLevel == 5)
720 { 720 {
721 const int sampleLength = 80; 721 const int sampleLength = 80;
722 char[] sampleChars = new char[sampleLength]; 722 char[] sampleChars = new char[sampleLength + 3];
723 reader.Read(sampleChars, 0, sampleLength); 723 reader.Read(sampleChars, 0, sampleLength);
724 sampleChars[80] = '.';
725 sampleChars[81] = '.';
726 sampleChars[82] = '.';
724 output = new string(sampleChars); 727 output = new string(sampleChars);
725 } 728 }
726 else 729 else
@@ -728,7 +731,7 @@ namespace OpenSim.Framework.Servers.HttpServer
728 output = reader.ReadToEnd(); 731 output = reader.ReadToEnd();
729 } 732 }
730 733
731 m_log.DebugFormat("[BASE HTTP SERVER]: {0}...", output.Replace("\n", @"\n")); 734 m_log.DebugFormat("[BASE HTTP SERVER]: {0}", output.Replace("\n", @"\n"));
732 } 735 }
733 } 736 }
734 737
@@ -1279,59 +1282,6 @@ namespace OpenSim.Framework.Servers.HttpServer
1279 map["login"] = OSD.FromString("false"); 1282 map["login"] = OSD.FromString("false");
1280 return map; 1283 return map;
1281 } 1284 }
1282 /// <summary>
1283 /// A specific agent handler was provided. Such a handler is expecetd to have an
1284 /// intimate, and highly specific relationship with the client. Consequently,
1285 /// nothing is done here.
1286 /// </summary>
1287 /// <param name="handler"></param>
1288 /// <param name="request"></param>
1289 /// <param name="response"></param>
1290
1291 private bool HandleAgentRequest(IHttpAgentHandler handler, OSHttpRequest request, OSHttpResponse response)
1292 {
1293 // In the case of REST, then handler is responsible for ALL aspects of
1294 // the request/response handling. Nothing is done here, not even encoding.
1295
1296 try
1297 {
1298 return handler.Handle(request, response);
1299 }
1300 catch (Exception e)
1301 {
1302 // If the handler did in fact close the stream, then this will blow
1303 // chunks. So that that doesn't disturb anybody we throw away any
1304 // and all exceptions raised. We've done our best to release the
1305 // client.
1306 try
1307 {
1308 m_log.Warn("[HTTP-AGENT]: Error - " + e.Message);
1309 response.SendChunked = false;
1310 response.KeepAlive = true;
1311 response.StatusCode = (int)OSHttpStatusCode.ServerErrorInternalError;
1312 //response.OutputStream.Close();
1313 try
1314 {
1315 response.Send();
1316 //response.FreeContext();
1317 }
1318 catch (SocketException f)
1319 {
1320 // This has to be here to prevent a Linux/Mono crash
1321 m_log.Warn(
1322 String.Format("[BASE HTTP SERVER]: XmlRpcRequest issue {0}.\nNOTE: this may be spurious on Linux. ", f.Message), f);
1323 }
1324 }
1325 catch(Exception)
1326 {
1327 }
1328 }
1329
1330 // Indicate that the request has been "handled"
1331
1332 return true;
1333
1334 }
1335 1285
1336 public byte[] HandleHTTPRequest(OSHttpRequest request, OSHttpResponse response) 1286 public byte[] HandleHTTPRequest(OSHttpRequest request, OSHttpResponse response)
1337 { 1287 {