change pollService stop() to send 503 error and no keepalive. ( untested )

This commit is contained in:
UbitUmarov
2015-08-18 23:59:55 +01:00
parent 05d72f77ff
commit 48ef22f62e
2 changed files with 32 additions and 6 deletions

View File

@@ -114,7 +114,29 @@ namespace OpenSim.Framework.Servers.HttpServer
PollServiceArgs.RequestsHandled++;
}
}
internal void DoHTTPstop(BaseHttpServer server)
{
OSHttpResponse response
= new OSHttpResponse(new HttpResponse(HttpContext, Request), HttpContext);
response.SendChunked = false;
response.ContentLength64 = 0;
response.ContentEncoding = Encoding.UTF8;
response.ReuseContext = false;
response.KeepAlive = false;
response.SendChunked = false;
response.StatusCode = 503;
try
{
response.OutputStream.Flush();
response.Send();
}
catch (Exception e)
{
}
}
}
class PollServiceHttpRequestComparer : IEqualityComparer<PollServiceHttpRequest>