dont let http keepalive and context reuse be true
parent
c83351b9c0
commit
e441c9cac1
|
@ -1270,7 +1270,8 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||||
requestStream.Close();
|
requestStream.Close();
|
||||||
|
|
||||||
//m_log.DebugFormat("[OGP]: {0}:{1}", request.RawUrl, requestBody);
|
//m_log.DebugFormat("[OGP]: {0}:{1}", request.RawUrl, requestBody);
|
||||||
response.KeepAlive = true;
|
// response.KeepAlive = true;
|
||||||
|
response.KeepAlive = false;
|
||||||
|
|
||||||
OSD llsdRequest = null;
|
OSD llsdRequest = null;
|
||||||
OSD llsdResponse = null;
|
OSD llsdResponse = null;
|
||||||
|
@ -1791,16 +1792,19 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||||
{
|
{
|
||||||
response.ProtocolVersion = (string)responsedata["http_protocol_version"];
|
response.ProtocolVersion = (string)responsedata["http_protocol_version"];
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
if (responsedata.ContainsKey("keepalive"))
|
if (responsedata.ContainsKey("keepalive"))
|
||||||
{
|
{
|
||||||
bool keepalive = (bool)responsedata["keepalive"];
|
bool keepalive = (bool)responsedata["keepalive"];
|
||||||
response.KeepAlive = keepalive;
|
response.KeepAlive = keepalive;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (responsedata.ContainsKey("reusecontext"))
|
if (responsedata.ContainsKey("reusecontext"))
|
||||||
response.ReuseContext = (bool) responsedata["reusecontext"];
|
response.ReuseContext = (bool) responsedata["reusecontext"];
|
||||||
|
*/
|
||||||
|
// disable this things
|
||||||
|
response.KeepAlive = false;
|
||||||
|
response.ReuseContext = false;
|
||||||
|
|
||||||
// Cross-Origin Resource Sharing with simple requests
|
// Cross-Origin Resource Sharing with simple requests
|
||||||
if (responsedata.ContainsKey("access_control_allow_origin"))
|
if (responsedata.ContainsKey("access_control_allow_origin"))
|
||||||
|
@ -1814,8 +1818,11 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||||
contentType = "text/html";
|
contentType = "text/html";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// The client ignores anything but 200 here for web login, so ensure that this is 200 for that
|
// The client ignores anything but 200 here for web login, so ensure that this is 200 for that
|
||||||
|
|
||||||
|
|
||||||
response.StatusCode = responsecode;
|
response.StatusCode = responsecode;
|
||||||
|
|
||||||
if (responsecode == (int)OSHttpStatusCode.RedirectMovedPermanently)
|
if (responsecode == (int)OSHttpStatusCode.RedirectMovedPermanently)
|
||||||
|
|
|
@ -148,6 +148,7 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||||
_httpResponse.Connection = ConnectionType.Close;
|
_httpResponse.Connection = ConnectionType.Close;
|
||||||
_httpResponse.KeepAlive = 0;
|
_httpResponse.KeepAlive = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_httpResponse.Connection = ConnectionType.KeepAlive;
|
_httpResponse.Connection = ConnectionType.KeepAlive;
|
||||||
|
@ -320,6 +321,11 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||||
public void Send()
|
public void Send()
|
||||||
{
|
{
|
||||||
_httpResponse.Body.Flush();
|
_httpResponse.Body.Flush();
|
||||||
|
|
||||||
|
// disable this till they are safe to use
|
||||||
|
_httpResponse.Connection = ConnectionType.Close;
|
||||||
|
_httpResponse.Chunked = false;
|
||||||
|
|
||||||
_httpResponse.Send();
|
_httpResponse.Send();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue