diff options
author | UbitUmarov | 2015-08-18 21:32:03 +0100 |
---|---|---|
committer | UbitUmarov | 2015-08-18 21:32:03 +0100 |
commit | 05d72f77ff38585817dead9b4a812ff97a001dce (patch) | |
tree | 109840c9d524ecddec25b5de2869f68254dd1aa1 | |
parent | try to serialize http requests from same connection, so they are processed (diff) | |
download | opensim-SC-05d72f77ff38585817dead9b4a812ff97a001dce.zip opensim-SC-05d72f77ff38585817dead9b4a812ff97a001dce.tar.gz opensim-SC-05d72f77ff38585817dead9b4a812ff97a001dce.tar.bz2 opensim-SC-05d72f77ff38585817dead9b4a812ff97a001dce.tar.xz |
do keepalive on mesh and texture GET. Dont use reusecontext any where.
setting of keepalive is wrong, it should follow the requested one ( or
always as http1.1) only deny if needed (errors). KeepAlive may increase
stress on number of avaiable file descritors.
5 files changed, 14 insertions, 14 deletions
diff --git a/OpenSim/Capabilities/Handlers/GetMesh/GetMeshHandler.cs b/OpenSim/Capabilities/Handlers/GetMesh/GetMeshHandler.cs index ec574a3..ae1aed7 100644 --- a/OpenSim/Capabilities/Handlers/GetMesh/GetMeshHandler.cs +++ b/OpenSim/Capabilities/Handlers/GetMesh/GetMeshHandler.cs | |||
@@ -61,7 +61,7 @@ namespace OpenSim.Capabilities.Handlers | |||
61 | Hashtable ret = new Hashtable(); | 61 | Hashtable ret = new Hashtable(); |
62 | ret["int_response_code"] = (int)System.Net.HttpStatusCode.NotFound; | 62 | ret["int_response_code"] = (int)System.Net.HttpStatusCode.NotFound; |
63 | ret["content_type"] = "text/plain"; | 63 | ret["content_type"] = "text/plain"; |
64 | ret["keepalive"] = false; | 64 | ret["keepalive"] = true; |
65 | ret["reusecontext"] = false; | 65 | ret["reusecontext"] = false; |
66 | ret["int_bytes"] = 0; | 66 | ret["int_bytes"] = 0; |
67 | ret["int_lod"] = 0; | 67 | ret["int_lod"] = 0; |
@@ -98,7 +98,7 @@ namespace OpenSim.Capabilities.Handlers | |||
98 | Hashtable responsedata = new Hashtable(); | 98 | Hashtable responsedata = new Hashtable(); |
99 | responsedata["int_response_code"] = 400; //501; //410; //404; | 99 | responsedata["int_response_code"] = 400; //501; //410; //404; |
100 | responsedata["content_type"] = "text/plain"; | 100 | responsedata["content_type"] = "text/plain"; |
101 | responsedata["keepalive"] = false; | 101 | responsedata["keepalive"] = true; |
102 | responsedata["str_response_string"] = "Request wasn't what was expected"; | 102 | responsedata["str_response_string"] = "Request wasn't what was expected"; |
103 | responsedata["reusecontext"] = false; | 103 | responsedata["reusecontext"] = false; |
104 | responsedata["int_lod"] = 0; | 104 | responsedata["int_lod"] = 0; |
@@ -116,7 +116,7 @@ namespace OpenSim.Capabilities.Handlers | |||
116 | { | 116 | { |
117 | responsedata["int_response_code"] = 404; //501; //410; //404; | 117 | responsedata["int_response_code"] = 404; //501; //410; //404; |
118 | responsedata["content_type"] = "text/plain"; | 118 | responsedata["content_type"] = "text/plain"; |
119 | responsedata["keepalive"] = false; | 119 | responsedata["keepalive"] = true; |
120 | responsedata["str_response_string"] = "The asset service is unavailable. So is your mesh."; | 120 | responsedata["str_response_string"] = "The asset service is unavailable. So is your mesh."; |
121 | responsedata["reusecontext"] = false; | 121 | responsedata["reusecontext"] = false; |
122 | return responsedata; | 122 | return responsedata; |
@@ -152,7 +152,7 @@ namespace OpenSim.Capabilities.Handlers | |||
152 | { | 152 | { |
153 | responsedata["int_response_code"] = 404; //501; //410; //404; | 153 | responsedata["int_response_code"] = 404; //501; //410; //404; |
154 | responsedata["content_type"] = "text/plain"; | 154 | responsedata["content_type"] = "text/plain"; |
155 | responsedata["keepalive"] = false; | 155 | responsedata["keepalive"] = true; |
156 | responsedata["str_response_string"] = "This range doesnt exist."; | 156 | responsedata["str_response_string"] = "This range doesnt exist."; |
157 | responsedata["reusecontext"] = false; | 157 | responsedata["reusecontext"] = false; |
158 | responsedata["int_lod"] = 3; | 158 | responsedata["int_lod"] = 3; |
@@ -228,7 +228,7 @@ namespace OpenSim.Capabilities.Handlers | |||
228 | { | 228 | { |
229 | responsedata["int_response_code"] = 404; //501; //410; //404; | 229 | responsedata["int_response_code"] = 404; //501; //410; //404; |
230 | responsedata["content_type"] = "text/plain"; | 230 | responsedata["content_type"] = "text/plain"; |
231 | responsedata["keepalive"] = false; | 231 | responsedata["keepalive"] = true; |
232 | responsedata["str_response_string"] = "Unfortunately, this asset isn't a mesh."; | 232 | responsedata["str_response_string"] = "Unfortunately, this asset isn't a mesh."; |
233 | responsedata["reusecontext"] = false; | 233 | responsedata["reusecontext"] = false; |
234 | responsedata["int_lod"] = 1; | 234 | responsedata["int_lod"] = 1; |
@@ -239,7 +239,7 @@ namespace OpenSim.Capabilities.Handlers | |||
239 | { | 239 | { |
240 | responsedata["int_response_code"] = 404; //501; //410; //404; | 240 | responsedata["int_response_code"] = 404; //501; //410; //404; |
241 | responsedata["content_type"] = "text/plain"; | 241 | responsedata["content_type"] = "text/plain"; |
242 | responsedata["keepalive"] = false; | 242 | responsedata["keepalive"] = true; |
243 | responsedata["str_response_string"] = "Your Mesh wasn't found. Sorry!"; | 243 | responsedata["str_response_string"] = "Your Mesh wasn't found. Sorry!"; |
244 | responsedata["reusecontext"] = false; | 244 | responsedata["reusecontext"] = false; |
245 | responsedata["int_lod"] = 0; | 245 | responsedata["int_lod"] = 0; |
diff --git a/OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs b/OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs index f3efb53..0e0cb39 100644 --- a/OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs +++ b/OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs | |||
@@ -66,7 +66,7 @@ namespace OpenSim.Capabilities.Handlers | |||
66 | Hashtable ret = new Hashtable(); | 66 | Hashtable ret = new Hashtable(); |
67 | ret["int_response_code"] = (int)System.Net.HttpStatusCode.NotFound; | 67 | ret["int_response_code"] = (int)System.Net.HttpStatusCode.NotFound; |
68 | ret["content_type"] = "text/plain"; | 68 | ret["content_type"] = "text/plain"; |
69 | ret["keepalive"] = false; | 69 | ret["keepalive"] = true; |
70 | ret["reusecontext"] = false; | 70 | ret["reusecontext"] = false; |
71 | ret["int_bytes"] = 0; | 71 | ret["int_bytes"] = 0; |
72 | string textureStr = (string)request["texture_id"]; | 72 | string textureStr = (string)request["texture_id"]; |
@@ -112,7 +112,7 @@ namespace OpenSim.Capabilities.Handlers | |||
112 | ret["error_status_text"] = "not found"; | 112 | ret["error_status_text"] = "not found"; |
113 | ret["str_response_string"] = "not found"; | 113 | ret["str_response_string"] = "not found"; |
114 | ret["content_type"] = "text/plain"; | 114 | ret["content_type"] = "text/plain"; |
115 | ret["keepalive"] = false; | 115 | ret["keepalive"] = true; |
116 | ret["reusecontext"] = false; | 116 | ret["reusecontext"] = false; |
117 | ret["int_bytes"] = 0; | 117 | ret["int_bytes"] = 0; |
118 | } | 118 | } |
diff --git a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs index 799ab80..1363eab 100644 --- a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs +++ b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs | |||
@@ -459,7 +459,7 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
459 | } | 459 | } |
460 | 460 | ||
461 | OSHttpResponse resp = new OSHttpResponse(new HttpResponse(context, request),context); | 461 | OSHttpResponse resp = new OSHttpResponse(new HttpResponse(context, request),context); |
462 | resp.ReuseContext = true; | 462 | resp.ReuseContext = false; |
463 | HandleRequest(req, resp); | 463 | HandleRequest(req, resp); |
464 | 464 | ||
465 | // !!!HACK ALERT!!! | 465 | // !!!HACK ALERT!!! |
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/GetMeshModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/GetMeshModule.cs index a381a1b..4c15ad8 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/GetMeshModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/GetMeshModule.cs | |||
@@ -264,7 +264,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
264 | response["int_response_code"] = 500; | 264 | response["int_response_code"] = 500; |
265 | response["str_response_string"] = "Script timeout"; | 265 | response["str_response_string"] = "Script timeout"; |
266 | response["content_type"] = "text/plain"; | 266 | response["content_type"] = "text/plain"; |
267 | response["keepalive"] = false; | 267 | response["keepalive"] = true; |
268 | response["reusecontext"] = false; | 268 | response["reusecontext"] = false; |
269 | 269 | ||
270 | return response; | 270 | return response; |
@@ -285,7 +285,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
285 | response["int_response_code"] = 500; | 285 | response["int_response_code"] = 500; |
286 | response["str_response_string"] = "Script timeout"; | 286 | response["str_response_string"] = "Script timeout"; |
287 | response["content_type"] = "text/plain"; | 287 | response["content_type"] = "text/plain"; |
288 | response["keepalive"] = false; | 288 | response["keepalive"] = true; |
289 | response["reusecontext"] = false; | 289 | response["reusecontext"] = false; |
290 | 290 | ||
291 | lock (responses) | 291 | lock (responses) |
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs index e053054..656f177 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs | |||
@@ -283,7 +283,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
283 | response["int_response_code"] = 500; | 283 | response["int_response_code"] = 500; |
284 | response["str_response_string"] = "Script timeout"; | 284 | response["str_response_string"] = "Script timeout"; |
285 | response["content_type"] = "text/plain"; | 285 | response["content_type"] = "text/plain"; |
286 | response["keepalive"] = false; | 286 | response["keepalive"] = true; |
287 | response["reusecontext"] = false; | 287 | response["reusecontext"] = false; |
288 | 288 | ||
289 | return response; | 289 | return response; |
@@ -303,7 +303,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
303 | response["int_response_code"] = 503; | 303 | response["int_response_code"] = 503; |
304 | response["str_response_string"] = "Throttled"; | 304 | response["str_response_string"] = "Throttled"; |
305 | response["content_type"] = "text/plain"; | 305 | response["content_type"] = "text/plain"; |
306 | response["keepalive"] = false; | 306 | response["keepalive"] = true; |
307 | response["reusecontext"] = false; | 307 | response["reusecontext"] = false; |
308 | 308 | ||
309 | lock (responses) | 309 | lock (responses) |
@@ -320,7 +320,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
320 | response["int_response_code"] = 500; | 320 | response["int_response_code"] = 500; |
321 | response["str_response_string"] = "Script timeout"; | 321 | response["str_response_string"] = "Script timeout"; |
322 | response["content_type"] = "text/plain"; | 322 | response["content_type"] = "text/plain"; |
323 | response["keepalive"] = false; | 323 | response["keepalive"] = true; |
324 | response["reusecontext"] = false; | 324 | response["reusecontext"] = false; |
325 | 325 | ||
326 | lock (responses) | 326 | lock (responses) |