aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorUbitUmarov2015-09-23 23:59:50 +0100
committerUbitUmarov2015-09-23 23:59:50 +0100
commite441c9cac127a834a1256e05ae754c0882f0398d (patch)
tree231f7b54b9c803c4ea0dc3108923c700c89ac9d4
parent fix the DC term on flat patch encoding (diff)
downloadopensim-SC-e441c9cac127a834a1256e05ae754c0882f0398d.zip
opensim-SC-e441c9cac127a834a1256e05ae754c0882f0398d.tar.gz
opensim-SC-e441c9cac127a834a1256e05ae754c0882f0398d.tar.bz2
opensim-SC-e441c9cac127a834a1256e05ae754c0882f0398d.tar.xz
dont let http keepalive and context reuse be true
-rw-r--r--OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs13
-rw-r--r--OpenSim/Framework/Servers/HttpServer/OSHttpResponse.cs6
2 files changed, 16 insertions, 3 deletions
diff --git a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
index 85976ab..cd14212 100644
--- a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
+++ b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
@@ -1270,7 +1270,8 @@ namespace OpenSim.Framework.Servers.HttpServer
1270 requestStream.Close(); 1270 requestStream.Close();
1271 1271
1272 //m_log.DebugFormat("[OGP]: {0}:{1}", request.RawUrl, requestBody); 1272 //m_log.DebugFormat("[OGP]: {0}:{1}", request.RawUrl, requestBody);
1273 response.KeepAlive = true; 1273 // response.KeepAlive = true;
1274 response.KeepAlive = false;
1274 1275
1275 OSD llsdRequest = null; 1276 OSD llsdRequest = null;
1276 OSD llsdResponse = null; 1277 OSD llsdResponse = null;
@@ -1791,16 +1792,19 @@ namespace OpenSim.Framework.Servers.HttpServer
1791 { 1792 {
1792 response.ProtocolVersion = (string)responsedata["http_protocol_version"]; 1793 response.ProtocolVersion = (string)responsedata["http_protocol_version"];
1793 } 1794 }
1794 1795/*
1795 if (responsedata.ContainsKey("keepalive")) 1796 if (responsedata.ContainsKey("keepalive"))
1796 { 1797 {
1797 bool keepalive = (bool)responsedata["keepalive"]; 1798 bool keepalive = (bool)responsedata["keepalive"];
1798 response.KeepAlive = keepalive; 1799 response.KeepAlive = keepalive;
1799
1800 } 1800 }
1801 1801
1802 if (responsedata.ContainsKey("reusecontext")) 1802 if (responsedata.ContainsKey("reusecontext"))
1803 response.ReuseContext = (bool) responsedata["reusecontext"]; 1803 response.ReuseContext = (bool) responsedata["reusecontext"];
1804*/
1805 // disable this things
1806 response.KeepAlive = false;
1807 response.ReuseContext = false;
1804 1808
1805 // Cross-Origin Resource Sharing with simple requests 1809 // Cross-Origin Resource Sharing with simple requests
1806 if (responsedata.ContainsKey("access_control_allow_origin")) 1810 if (responsedata.ContainsKey("access_control_allow_origin"))
@@ -1814,8 +1818,11 @@ namespace OpenSim.Framework.Servers.HttpServer
1814 contentType = "text/html"; 1818 contentType = "text/html";
1815 } 1819 }
1816 1820
1821
1822
1817 // The client ignores anything but 200 here for web login, so ensure that this is 200 for that 1823 // The client ignores anything but 200 here for web login, so ensure that this is 200 for that
1818 1824
1825
1819 response.StatusCode = responsecode; 1826 response.StatusCode = responsecode;
1820 1827
1821 if (responsecode == (int)OSHttpStatusCode.RedirectMovedPermanently) 1828 if (responsecode == (int)OSHttpStatusCode.RedirectMovedPermanently)
diff --git a/OpenSim/Framework/Servers/HttpServer/OSHttpResponse.cs b/OpenSim/Framework/Servers/HttpServer/OSHttpResponse.cs
index 89fb5d4..17e9dc2 100644
--- a/OpenSim/Framework/Servers/HttpServer/OSHttpResponse.cs
+++ b/OpenSim/Framework/Servers/HttpServer/OSHttpResponse.cs
@@ -148,6 +148,7 @@ namespace OpenSim.Framework.Servers.HttpServer
148 _httpResponse.Connection = ConnectionType.Close; 148 _httpResponse.Connection = ConnectionType.Close;
149 _httpResponse.KeepAlive = 0; 149 _httpResponse.KeepAlive = 0;
150 } 150 }
151
151 else 152 else
152 { 153 {
153 _httpResponse.Connection = ConnectionType.KeepAlive; 154 _httpResponse.Connection = ConnectionType.KeepAlive;
@@ -320,6 +321,11 @@ namespace OpenSim.Framework.Servers.HttpServer
320 public void Send() 321 public void Send()
321 { 322 {
322 _httpResponse.Body.Flush(); 323 _httpResponse.Body.Flush();
324
325 // disable this till they are safe to use
326 _httpResponse.Connection = ConnectionType.Close;
327 _httpResponse.Chunked = false;
328
323 _httpResponse.Send(); 329 _httpResponse.Send();
324 } 330 }
325 331