aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorTeravus Ovares2008-12-20 15:09:01 +0000
committerTeravus Ovares2008-12-20 15:09:01 +0000
commit8f07f2e8b006ef7712318e29a2793f939f2c90b5 (patch)
tree9042d812f2271777c1825194af4086da4d5dc01e
parentSlowing things down a little bit in TPs, with a couple of extra Thread.Sleep ... (diff)
downloadopensim-SC-8f07f2e8b006ef7712318e29a2793f939f2c90b5.zip
opensim-SC-8f07f2e8b006ef7712318e29a2793f939f2c90b5.tar.gz
opensim-SC-8f07f2e8b006ef7712318e29a2793f939f2c90b5.tar.bz2
opensim-SC-8f07f2e8b006ef7712318e29a2793f939f2c90b5.tar.xz
* A few more fixes to HttpServer.
* http://www.codeplex.com/webserver/WorkItem/View.aspx?WorkItemId=3110 fix erronious call to beginread that caused an exception which was caught and ignored (increase performance) * Pass socket into httpclientcontectImp and call the disconnect + reuse method so the socket can be reused quicker (increase performance) * Ensured that in every error scenario beginAccept is called (stability) * Fixed header casing (standards compliance) * Fixed Connection: close handling (standards compliance)
-rw-r--r--OpenSim/Framework/Servers/BaseHttpServer.cs11
-rw-r--r--OpenSim/Framework/Servers/OSHttpResponse.cs1
-rw-r--r--bin/HttpServer.dllbin139264 -> 155648 bytes
3 files changed, 10 insertions, 2 deletions
diff --git a/OpenSim/Framework/Servers/BaseHttpServer.cs b/OpenSim/Framework/Servers/BaseHttpServer.cs
index c182dfc..b3f4f0f 100644
--- a/OpenSim/Framework/Servers/BaseHttpServer.cs
+++ b/OpenSim/Framework/Servers/BaseHttpServer.cs
@@ -222,6 +222,7 @@ namespace OpenSim.Framework.Servers
222 { 222 {
223 OSHttpRequest req = new OSHttpRequest(context, request); 223 OSHttpRequest req = new OSHttpRequest(context, request);
224 OSHttpResponse resp = new OSHttpResponse(new HttpServer.HttpResponse(context, request)); 224 OSHttpResponse resp = new OSHttpResponse(new HttpServer.HttpResponse(context, request));
225 //resp.KeepAlive = req.KeepAlive;
225 //m_log.Info("[Debug BASE HTTP SERVER]: Got Request"); 226 //m_log.Info("[Debug BASE HTTP SERVER]: Got Request");
226 //HttpServerContextObj objstate= new HttpServerContextObj(req,resp); 227 //HttpServerContextObj objstate= new HttpServerContextObj(req,resp);
227 //ThreadPool.QueueUserWorkItem(new WaitCallback(ConvertIHttpClientContextToOSHttp), (object)objstate); 228 //ThreadPool.QueueUserWorkItem(new WaitCallback(ConvertIHttpClientContextToOSHttp), (object)objstate);
@@ -291,7 +292,7 @@ namespace OpenSim.Framework.Servers
291 } 292 }
292 293
293 IRequestHandler requestHandler; 294 IRequestHandler requestHandler;
294 response.KeepAlive = true; 295 //response.KeepAlive = true;
295 response.SendChunked = false; 296 response.SendChunked = false;
296 297
297 string path = request.RawUrl; 298 string path = request.RawUrl;
@@ -1413,7 +1414,9 @@ namespace OpenSim.Framework.Servers
1413 1414
1414 public void httpServerException(object source, Exception exception) 1415 public void httpServerException(object source, Exception exception)
1415 { 1416 {
1417
1416 m_log.ErrorFormat("[HTTPSERVER]: {0} had an exception {1}", source.ToString(), exception.ToString()); 1418 m_log.ErrorFormat("[HTTPSERVER]: {0} had an exception {1}", source.ToString(), exception.ToString());
1419 /*
1417 if (HTTPDRunning)// && NotSocketErrors > 5) 1420 if (HTTPDRunning)// && NotSocketErrors > 5)
1418 { 1421 {
1419 Stop(); 1422 Stop();
@@ -1421,6 +1424,7 @@ namespace OpenSim.Framework.Servers
1421 StartHTTP(); 1424 StartHTTP();
1422 m_log.Warn("[HTTPSERVER]: Died. Trying to kick....."); 1425 m_log.Warn("[HTTPSERVER]: Died. Trying to kick.....");
1423 } 1426 }
1427 */
1424 } 1428 }
1425 1429
1426 public void Stop() 1430 public void Stop()
@@ -1551,7 +1555,7 @@ namespace OpenSim.Framework.Servers
1551 } 1555 }
1552 public class HttpServerLogWriter : HttpServer.ILogWriter 1556 public class HttpServerLogWriter : HttpServer.ILogWriter
1553 { 1557 {
1554 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 1558 //private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
1555 1559
1556 public HttpServerLogWriter() 1560 public HttpServerLogWriter()
1557 { 1561 {
@@ -1559,6 +1563,8 @@ namespace OpenSim.Framework.Servers
1559 1563
1560 public void Write(object source, HttpServer.LogPrio priority, string message) 1564 public void Write(object source, HttpServer.LogPrio priority, string message)
1561 { 1565 {
1566 return;
1567 /*
1562 switch (priority) 1568 switch (priority)
1563 { 1569 {
1564 case HttpServer.LogPrio.Debug: 1570 case HttpServer.LogPrio.Debug:
@@ -1580,6 +1586,7 @@ namespace OpenSim.Framework.Servers
1580 break; 1586 break;
1581 1587
1582 } 1588 }
1589 */
1583 } 1590 }
1584 1591
1585 } 1592 }
diff --git a/OpenSim/Framework/Servers/OSHttpResponse.cs b/OpenSim/Framework/Servers/OSHttpResponse.cs
index 6b20bf3..4947156 100644
--- a/OpenSim/Framework/Servers/OSHttpResponse.cs
+++ b/OpenSim/Framework/Servers/OSHttpResponse.cs
@@ -298,6 +298,7 @@ namespace OpenSim.Framework.Servers
298 { 298 {
299 _httpResponse.Body.Flush(); 299 _httpResponse.Body.Flush();
300 _httpResponse.Send(); 300 _httpResponse.Send();
301
301 } 302 }
302 } 303 }
303} 304}
diff --git a/bin/HttpServer.dll b/bin/HttpServer.dll
index c57e023..1a5c7ee 100644
--- a/bin/HttpServer.dll
+++ b/bin/HttpServer.dll
Binary files differ