* 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)0.6.1-post-fixes
parent
7a619ad84a
commit
8f07f2e8b0
|
@ -222,6 +222,7 @@ namespace OpenSim.Framework.Servers
|
||||||
{
|
{
|
||||||
OSHttpRequest req = new OSHttpRequest(context, request);
|
OSHttpRequest req = new OSHttpRequest(context, request);
|
||||||
OSHttpResponse resp = new OSHttpResponse(new HttpServer.HttpResponse(context, request));
|
OSHttpResponse resp = new OSHttpResponse(new HttpServer.HttpResponse(context, request));
|
||||||
|
//resp.KeepAlive = req.KeepAlive;
|
||||||
//m_log.Info("[Debug BASE HTTP SERVER]: Got Request");
|
//m_log.Info("[Debug BASE HTTP SERVER]: Got Request");
|
||||||
//HttpServerContextObj objstate= new HttpServerContextObj(req,resp);
|
//HttpServerContextObj objstate= new HttpServerContextObj(req,resp);
|
||||||
//ThreadPool.QueueUserWorkItem(new WaitCallback(ConvertIHttpClientContextToOSHttp), (object)objstate);
|
//ThreadPool.QueueUserWorkItem(new WaitCallback(ConvertIHttpClientContextToOSHttp), (object)objstate);
|
||||||
|
@ -291,7 +292,7 @@ namespace OpenSim.Framework.Servers
|
||||||
}
|
}
|
||||||
|
|
||||||
IRequestHandler requestHandler;
|
IRequestHandler requestHandler;
|
||||||
response.KeepAlive = true;
|
//response.KeepAlive = true;
|
||||||
response.SendChunked = false;
|
response.SendChunked = false;
|
||||||
|
|
||||||
string path = request.RawUrl;
|
string path = request.RawUrl;
|
||||||
|
@ -1413,7 +1414,9 @@ namespace OpenSim.Framework.Servers
|
||||||
|
|
||||||
public void httpServerException(object source, Exception exception)
|
public void httpServerException(object source, Exception exception)
|
||||||
{
|
{
|
||||||
|
|
||||||
m_log.ErrorFormat("[HTTPSERVER]: {0} had an exception {1}", source.ToString(), exception.ToString());
|
m_log.ErrorFormat("[HTTPSERVER]: {0} had an exception {1}", source.ToString(), exception.ToString());
|
||||||
|
/*
|
||||||
if (HTTPDRunning)// && NotSocketErrors > 5)
|
if (HTTPDRunning)// && NotSocketErrors > 5)
|
||||||
{
|
{
|
||||||
Stop();
|
Stop();
|
||||||
|
@ -1421,6 +1424,7 @@ namespace OpenSim.Framework.Servers
|
||||||
StartHTTP();
|
StartHTTP();
|
||||||
m_log.Warn("[HTTPSERVER]: Died. Trying to kick.....");
|
m_log.Warn("[HTTPSERVER]: Died. Trying to kick.....");
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Stop()
|
public void Stop()
|
||||||
|
@ -1551,7 +1555,7 @@ namespace OpenSim.Framework.Servers
|
||||||
}
|
}
|
||||||
public class HttpServerLogWriter : HttpServer.ILogWriter
|
public class HttpServerLogWriter : HttpServer.ILogWriter
|
||||||
{
|
{
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
//private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
|
||||||
public HttpServerLogWriter()
|
public HttpServerLogWriter()
|
||||||
{
|
{
|
||||||
|
@ -1559,6 +1563,8 @@ namespace OpenSim.Framework.Servers
|
||||||
|
|
||||||
public void Write(object source, HttpServer.LogPrio priority, string message)
|
public void Write(object source, HttpServer.LogPrio priority, string message)
|
||||||
{
|
{
|
||||||
|
return;
|
||||||
|
/*
|
||||||
switch (priority)
|
switch (priority)
|
||||||
{
|
{
|
||||||
case HttpServer.LogPrio.Debug:
|
case HttpServer.LogPrio.Debug:
|
||||||
|
@ -1580,6 +1586,7 @@ namespace OpenSim.Framework.Servers
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -298,6 +298,7 @@ namespace OpenSim.Framework.Servers
|
||||||
{
|
{
|
||||||
_httpResponse.Body.Flush();
|
_httpResponse.Body.Flush();
|
||||||
_httpResponse.Send();
|
_httpResponse.Send();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Binary file not shown.
Loading…
Reference in New Issue