From 48ef22f62e07c0b9e6d23ee758a4800d05cfb231 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Tue, 18 Aug 2015 23:59:55 +0100 Subject: change pollService stop() to send 503 error and no keepalive. ( untested ) --- .../Servers/HttpServer/PollServiceHttpRequest.cs | 24 +++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) (limited to 'OpenSim/Framework/Servers/HttpServer/PollServiceHttpRequest.cs') diff --git a/OpenSim/Framework/Servers/HttpServer/PollServiceHttpRequest.cs b/OpenSim/Framework/Servers/HttpServer/PollServiceHttpRequest.cs index e636c38..5bd63a6 100644 --- a/OpenSim/Framework/Servers/HttpServer/PollServiceHttpRequest.cs +++ b/OpenSim/Framework/Servers/HttpServer/PollServiceHttpRequest.cs @@ -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 -- cgit v1.1