diff options
Diffstat (limited to 'OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs')
-rw-r--r-- | OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs | 32 |
1 files changed, 28 insertions, 4 deletions
diff --git a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs index ef6e259..9cc1d4c 100644 --- a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs +++ b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs | |||
@@ -1436,10 +1436,34 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
1436 | 1436 | ||
1437 | internal byte[] DoHTTPGruntWork(Hashtable responsedata, OSHttpResponse response) | 1437 | internal byte[] DoHTTPGruntWork(Hashtable responsedata, OSHttpResponse response) |
1438 | { | 1438 | { |
1439 | //m_log.Info("[BASE HTTP SERVER]: Doing HTTP Grunt work with response"); | 1439 | int responsecode; |
1440 | int responsecode = (int)responsedata["int_response_code"]; | 1440 | string responseString; |
1441 | string responseString = (string)responsedata["str_response_string"]; | 1441 | string contentType; |
1442 | string contentType = (string)responsedata["content_type"]; | 1442 | |
1443 | if (responsedata == null) | ||
1444 | { | ||
1445 | responsecode = 500; | ||
1446 | responseString = "No response could be obtained"; | ||
1447 | contentType = "text/plain"; | ||
1448 | responsedata = new Hashtable(); | ||
1449 | } | ||
1450 | else | ||
1451 | { | ||
1452 | try | ||
1453 | { | ||
1454 | //m_log.Info("[BASE HTTP SERVER]: Doing HTTP Grunt work with response"); | ||
1455 | responsecode = (int)responsedata["int_response_code"]; | ||
1456 | responseString = (string)responsedata["str_response_string"]; | ||
1457 | contentType = (string)responsedata["content_type"]; | ||
1458 | } | ||
1459 | catch | ||
1460 | { | ||
1461 | responsecode = 500; | ||
1462 | responseString = "No response could be obtained"; | ||
1463 | contentType = "text/plain"; | ||
1464 | responsedata = new Hashtable(); | ||
1465 | } | ||
1466 | } | ||
1443 | 1467 | ||
1444 | if (responsedata.ContainsKey("error_status_text")) | 1468 | if (responsedata.ContainsKey("error_status_text")) |
1445 | { | 1469 | { |