Fixed last-resort sending of error response (HTTP 500) when an error occurs while handling a request.
The previous code didn't actually send the response, so the caller was stuck until the timeout (100 seconds).0.8.0.3
parent
fad0fd7f75
commit
bbfda8e19e
|
@ -492,8 +492,8 @@ namespace OpenSim.Framework.Servers.HttpServer
|
|||
try
|
||||
{
|
||||
byte[] buffer500 = SendHTML500(response);
|
||||
response.Body.Write(buffer500,0,buffer500.Length);
|
||||
response.Body.Close();
|
||||
response.OutputStream.Write(buffer500, 0, buffer500.Length);
|
||||
response.Send();
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
@ -746,8 +746,8 @@ namespace OpenSim.Framework.Servers.HttpServer
|
|||
try
|
||||
{
|
||||
byte[] buffer500 = SendHTML500(response);
|
||||
response.Body.Write(buffer500, 0, buffer500.Length);
|
||||
response.Body.Close();
|
||||
response.OutputStream.Write(buffer500, 0, buffer500.Length);
|
||||
response.Send();
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
|
|
@ -1203,9 +1203,9 @@ namespace OpenSim.Framework
|
|||
if (hwr != null && hwr.StatusCode == HttpStatusCode.NotFound)
|
||||
return deserial;
|
||||
else
|
||||
m_log.ErrorFormat(
|
||||
"[SynchronousRestObjectRequester]: WebException for {0} {1} {2}: {3} {4}",
|
||||
verb, requestUrl, typeof(TResponse).ToString(), e.Message, e.StackTrace);
|
||||
m_log.Error(string.Format(
|
||||
"[SynchronousRestObjectRequester]: WebException for {0} {1} {2} ",
|
||||
verb, requestUrl, typeof(TResponse).ToString()), e);
|
||||
}
|
||||
}
|
||||
catch (System.InvalidOperationException)
|
||||
|
@ -1217,9 +1217,9 @@ namespace OpenSim.Framework
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.DebugFormat(
|
||||
"[SynchronousRestObjectRequester]: Exception on response from {0} {1}: {2}{3}",
|
||||
verb, requestUrl, e.Message, e.StackTrace);
|
||||
m_log.Debug(string.Format(
|
||||
"[SynchronousRestObjectRequester]: Exception on response from {0} {1} ",
|
||||
verb, requestUrl), e);
|
||||
}
|
||||
|
||||
int tickdiff = Util.EnvironmentTickCountSubtract(tickstart);
|
||||
|
|
Loading…
Reference in New Issue