mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 00:46:02 +08:00
Merge branch 'master' into careminster-presence-refactor
This commit is contained in:
@@ -81,7 +81,7 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.DebugFormat("[FORMS]: exception occured on sending request {0}", e.Message);
|
||||
m_log.DebugFormat("[FORMS]: exception occured on sending request to {0}: {1}", requestUrl, e.Message);
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
||||
@@ -146,18 +146,23 @@ namespace OpenSim.Framework
|
||||
{
|
||||
using (Stream responseStream = response.GetResponseStream())
|
||||
{
|
||||
string responseStr = null;
|
||||
|
||||
try
|
||||
{
|
||||
string responseStr = responseStream.GetStreamString();
|
||||
responseStr = responseStream.GetStreamString();
|
||||
OSD responseOSD = OSDParser.Deserialize(responseStr);
|
||||
if (responseOSD.Type == OSDType.Map)
|
||||
return (OSDMap)responseOSD;
|
||||
else
|
||||
errorMessage = "Response format was invalid.";
|
||||
}
|
||||
catch
|
||||
catch (Exception ex)
|
||||
{
|
||||
errorMessage = "Failed to parse the response.";
|
||||
if (!String.IsNullOrEmpty(responseStr))
|
||||
errorMessage = "Failed to parse the response:\n" + responseStr;
|
||||
else
|
||||
errorMessage = "Failed to retrieve the response: " + ex.Message;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user