From b000d9ba724ae12ae27c49dd94e36d4592bd6c26 Mon Sep 17 00:00:00 2001 From: Tom Date: Thu, 26 May 2011 03:42:01 -0700 Subject: Some additional protection, it seems that responsedata needs to be locked, but I can't immediately see where it's being accessed from another thread. For now, this will protect the server --- .../Framework/Servers/HttpServer/BaseHttpServer.cs | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'OpenSim/Framework/Servers/HttpServer') diff --git a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs index 36c6c75..c12d666 100644 --- a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs +++ b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs @@ -1523,11 +1523,20 @@ namespace OpenSim.Framework.Servers.HttpServer } else { - - //m_log.Info("[BASE HTTP SERVER]: Doing HTTP Grunt work with response"); - responsecode = (int)responsedata["int_response_code"]; - responseString = (string)responsedata["str_response_string"]; - contentType = (string)responsedata["content_type"]; + try + { + //m_log.Info("[BASE HTTP SERVER]: Doing HTTP Grunt work with response"); + responsecode = (int)responsedata["int_response_code"]; + responseString = (string)responsedata["str_response_string"]; + contentType = (string)responsedata["content_type"]; + } + catch + { + responsecode = 500; + responseString = "No response could be obtained"; + contentType = "text/plain"; + responsedata = new Hashtable(); + } } if (responsedata.ContainsKey("error_status_text")) -- cgit v1.1