Always throw an exception if MakeRequest (used for HTTP POST) fails. (Previously many exceptions were ignored)
Resolves http://opensimulator.org/mantis/view.php?id=69490.8.0.3
parent
f901a38204
commit
f90aee696a
|
@ -738,11 +738,11 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||||
}
|
}
|
||||||
catch (IOException e)
|
catch (IOException e)
|
||||||
{
|
{
|
||||||
m_log.Error(String.Format("[BASE HTTP SERVER]: HandleRequest() threw {0} ", e.StackTrace), e);
|
m_log.Error("[BASE HTTP SERVER]: HandleRequest() threw exception ", e);
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
m_log.Error(String.Format("[BASE HTTP SERVER]: HandleRequest() threw {0} ", e.StackTrace), e);
|
m_log.Error("[BASE HTTP SERVER]: HandleRequest() threw exception ", e);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
byte[] buffer500 = SendHTML500(response);
|
byte[] buffer500 = SendHTML500(response);
|
||||||
|
|
|
@ -1024,8 +1024,9 @@ namespace OpenSim.Framework
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
m_log.DebugFormat(
|
m_log.ErrorFormat("[FORMS]: Error sending request to {0}: {1}. Request: {2}", requestUrl, e.Message,
|
||||||
"[FORMS]: exception occured {0} {1}: {2}{3}", verb, requestUrl, e.Message, e.StackTrace);
|
obj.Length > WebUtil.MaxRequestDiagLength ? obj.Remove(WebUtil.MaxRequestDiagLength) : obj);
|
||||||
|
throw e;
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
|
@ -1043,27 +1044,17 @@ namespace OpenSim.Framework
|
||||||
{
|
{
|
||||||
if (resp.ContentLength != 0)
|
if (resp.ContentLength != 0)
|
||||||
{
|
{
|
||||||
Stream respStream = null;
|
using (Stream respStream = resp.GetResponseStream())
|
||||||
try
|
using (StreamReader reader = new StreamReader(respStream))
|
||||||
{
|
respstring = reader.ReadToEnd();
|
||||||
using (respStream = resp.GetResponseStream())
|
|
||||||
using (StreamReader reader = new StreamReader(respStream))
|
|
||||||
respstring = reader.ReadToEnd();
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
m_log.DebugFormat(
|
|
||||||
"[FORMS]: Exception occured on receiving {0} {1}: {2}{3}",
|
|
||||||
verb, requestUrl, e.Message, e.StackTrace);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (System.InvalidOperationException e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
m_log.Debug(
|
m_log.ErrorFormat("[FORMS]: Error receiving response from {0}: {1}. Request: {2}", requestUrl, e.Message,
|
||||||
string.Format(
|
obj.Length > WebUtil.MaxRequestDiagLength ? obj.Remove(WebUtil.MaxRequestDiagLength) : obj);
|
||||||
"[FORMS]: InvalidOperationException on response from {0} {1} ", verb, requestUrl), e);
|
throw e;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue