aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
diff options
context:
space:
mode:
authorTeravus Ovares2009-07-30 18:16:00 +0000
committerTeravus Ovares2009-07-30 18:16:00 +0000
commit23a8895d293f33e8dfcc4aaf56c6fcb49106e979 (patch)
tree93a1384385a114b8286a4be173d2dde423c457f1 /OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
parentThank you, dmiles, for a patch that allows more differentiated script (diff)
downloadopensim-SC_OLD-23a8895d293f33e8dfcc4aaf56c6fcb49106e979.zip
opensim-SC_OLD-23a8895d293f33e8dfcc4aaf56c6fcb49106e979.tar.gz
opensim-SC_OLD-23a8895d293f33e8dfcc4aaf56c6fcb49106e979.tar.bz2
opensim-SC_OLD-23a8895d293f33e8dfcc4aaf56c6fcb49106e979.tar.xz
* Fixed another potential httpserver leak.
Diffstat (limited to 'OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs')
-rw-r--r--OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs7
1 files changed, 6 insertions, 1 deletions
diff --git a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
index d268457..fbd7166 100644
--- a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
+++ b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
@@ -1321,6 +1321,7 @@ namespace OpenSim.Framework.Servers.HttpServer
1321 string responseString = (string)responsedata["str_response_string"]; 1321 string responseString = (string)responsedata["str_response_string"];
1322 string contentType = (string)responsedata["content_type"]; 1322 string contentType = (string)responsedata["content_type"];
1323 1323
1324
1324 if (responsedata.ContainsKey("error_status_text")) 1325 if (responsedata.ContainsKey("error_status_text"))
1325 { 1326 {
1326 response.StatusDescription = (string)responsedata["error_status_text"]; 1327 response.StatusDescription = (string)responsedata["error_status_text"];
@@ -1336,6 +1337,10 @@ namespace OpenSim.Framework.Servers.HttpServer
1336 response.KeepAlive = keepalive; 1337 response.KeepAlive = keepalive;
1337 1338
1338 } 1339 }
1340
1341 if (responsedata.ContainsKey("reusecontext"))
1342 response.ReuseContext = (bool) responsedata["reusecontext"];
1343
1339 //Even though only one other part of the entire code uses HTTPHandlers, we shouldn't expect this 1344 //Even though only one other part of the entire code uses HTTPHandlers, we shouldn't expect this
1340 //and should check for NullReferenceExceptions 1345 //and should check for NullReferenceExceptions
1341 1346
@@ -1391,7 +1396,7 @@ namespace OpenSim.Framework.Servers.HttpServer
1391 response.OutputStream.Flush(); 1396 response.OutputStream.Flush();
1392 response.Send(); 1397 response.Send();
1393 1398
1394 if (!response.KeepAlive) 1399 if (!response.KeepAlive && response.ReuseContext)
1395 response.FreeContext(); 1400 response.FreeContext();
1396 } 1401 }
1397 catch (SocketException e) 1402 catch (SocketException e)