Remove support for executing a handler on poll. It caused other issues

remotes/origin/0.6.7-post-fixes
Melanie 2009-09-22 05:24:22 +01:00
parent 06871d51dd
commit c5be401d46
1 changed files with 11 additions and 27 deletions

View File

@ -337,24 +337,19 @@ namespace OpenSim.Framework.Servers.HttpServer
// handled
//m_log.Debug("[BASE HTTP SERVER]: Handling Request" + request.RawUrl);
// If the response is null, then we're not going to respond here. This case
// triggers when we're at the head of a HTTP poll
//
if (response != null)
IHttpAgentHandler agentHandler;
if (TryGetAgentHandler(request, response, out agentHandler))
{
IHttpAgentHandler agentHandler;
if (TryGetAgentHandler(request, response, out agentHandler))
if (HandleAgentRequest(agentHandler, request, response))
{
if (HandleAgentRequest(agentHandler, request, response))
{
return;
}
return;
}
//response.KeepAlive = true;
response.SendChunked = false;
}
//response.KeepAlive = true;
response.SendChunked = false;
IRequestHandler requestHandler;
string path = request.RawUrl;
@ -368,8 +363,7 @@ namespace OpenSim.Framework.Servers.HttpServer
// Okay, so this is bad, but should be considered temporary until everything is IStreamHandler.
byte[] buffer = null;
if (response != null)
response.ContentType = requestHandler.ContentType; // Lets do this defaulting before in case handler has varying content type.
response.ContentType = requestHandler.ContentType; // Lets do this defaulting before in case handler has varying content type.
if (requestHandler is IStreamedRequestHandler)
@ -425,12 +419,7 @@ namespace OpenSim.Framework.Servers.HttpServer
//m_log.Warn("[HTTP]: " + requestBody);
}
// If we're not responding, we dont' care about the reply
//
if (response == null)
HTTPRequestHandler.Handle(path, keysvals);
else
DoHTTPGruntWork(HTTPRequestHandler.Handle(path, keysvals), response);
DoHTTPGruntWork(HTTPRequestHandler.Handle(path, keysvals), response);
return;
}
else
@ -445,11 +434,6 @@ namespace OpenSim.Framework.Servers.HttpServer
}
}
// The handler has run and we're not yet ready to respond, bail
//
if (response == null)
return;
request.InputStream.Close();
// HTTP IN support. The script engine taes it from here