aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r--OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs13
-rw-r--r--OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs9
2 files changed, 3 insertions, 19 deletions
diff --git a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
index e59d475..ce4503c 100644
--- a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
+++ b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
@@ -1935,20 +1935,13 @@ namespace OpenSim.Framework.Servers.HttpServer
1935 { 1935 {
1936 response.ProtocolVersion = (string)responsedata["http_protocol_version"]; 1936 response.ProtocolVersion = (string)responsedata["http_protocol_version"];
1937 } 1937 }
1938/* 1938
1939 if (responsedata.ContainsKey("keepalive")) 1939 if (responsedata.ContainsKey("keepalive"))
1940 { 1940 {
1941 bool keepalive = (bool)responsedata["keepalive"]; 1941 bool keepalive = (bool)responsedata["keepalive"];
1942 response.KeepAlive = keepalive; 1942 response.KeepAlive = keepalive;
1943 } 1943 }
1944 1944
1945 if (responsedata.ContainsKey("reusecontext"))
1946 response.ReuseContext = (bool) responsedata["reusecontext"];
1947*/
1948 // disable this things
1949 response.KeepAlive = false;
1950 // response.ReuseContext = false;
1951
1952 // Cross-Origin Resource Sharing with simple requests 1945 // Cross-Origin Resource Sharing with simple requests
1953 if (responsedata.ContainsKey("access_control_allow_origin")) 1946 if (responsedata.ContainsKey("access_control_allow_origin"))
1954 response.AddHeader("Access-Control-Allow-Origin", (string)responsedata["access_control_allow_origin"]); 1947 response.AddHeader("Access-Control-Allow-Origin", (string)responsedata["access_control_allow_origin"]);
@@ -1961,11 +1954,8 @@ namespace OpenSim.Framework.Servers.HttpServer
1961 contentType = "text/html"; 1954 contentType = "text/html";
1962 } 1955 }
1963 1956
1964
1965
1966 // The client ignores anything but 200 here for web login, so ensure that this is 200 for that 1957 // The client ignores anything but 200 here for web login, so ensure that this is 200 for that
1967 1958
1968
1969 response.StatusCode = responsecode; 1959 response.StatusCode = responsecode;
1970 1960
1971 if (responsecode == (int)OSHttpStatusCode.RedirectMovedPermanently) 1961 if (responsecode == (int)OSHttpStatusCode.RedirectMovedPermanently)
@@ -1975,7 +1965,6 @@ namespace OpenSim.Framework.Servers.HttpServer
1975 } 1965 }
1976 1966
1977 response.AddHeader("Content-Type", contentType); 1967 response.AddHeader("Content-Type", contentType);
1978
1979 if (responsedata.ContainsKey("headers")) 1968 if (responsedata.ContainsKey("headers"))
1980 { 1969 {
1981 Hashtable headerdata = (Hashtable)responsedata["headers"]; 1970 Hashtable headerdata = (Hashtable)responsedata["headers"];
diff --git a/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs b/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs
index 415c264..cbdd781 100644
--- a/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs
+++ b/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs
@@ -271,22 +271,17 @@ namespace OpenSim.Framework.Servers.HttpServer
271 271
272 if (req.PollServiceArgs.HasEvents(req.RequestID, req.PollServiceArgs.Id)) 272 if (req.PollServiceArgs.HasEvents(req.RequestID, req.PollServiceArgs.Id))
273 { 273 {
274 Hashtable responsedata = req.PollServiceArgs.GetEvents(req.RequestID, req.PollServiceArgs.Id);
275
276 m_threadPool.QueueWorkItem(x => 274 m_threadPool.QueueWorkItem(x =>
277 { 275 {
278 try 276 try
279 { 277 {
278 Hashtable responsedata = req.PollServiceArgs.GetEvents(req.RequestID, req.PollServiceArgs.Id);
280 req.DoHTTPGruntWork(m_server, responsedata); 279 req.DoHTTPGruntWork(m_server, responsedata);
281 } 280 }
282 catch (ObjectDisposedException) { } 281 catch (ObjectDisposedException) { }
283 finally 282 finally
284 { 283 {
285 if(req.HttpContext.CanSend() && req.PollServiceArgs.Type == PollServiceEventArgs.EventType.Poll 284 byContextDequeue(req);
286 && (Environment.TickCount - req.RequestTime) > req.PollServiceArgs.TimeOutms)
287 ReQueueEvent(req);
288 else
289 byContextDequeue(req);
290 } 285 }
291 return null; 286 return null;
292 }, null); 287 }, null);