some conditional dispose on http requests inputstream
parent
b20778d8ec
commit
6c79cc652b
|
@ -815,7 +815,8 @@ namespace OpenSim.Framework.Servers.HttpServer
|
|||
}
|
||||
}
|
||||
|
||||
request.InputStream.Dispose();
|
||||
if(request.InputStream.CanRead)
|
||||
request.InputStream.Dispose();
|
||||
|
||||
if (buffer != null)
|
||||
{
|
||||
|
|
|
@ -86,6 +86,9 @@ namespace OpenSim.Framework.Servers.HttpServer
|
|||
|
||||
byte[] buffer = server.DoHTTPGruntWork(responsedata, response);
|
||||
|
||||
if(Request.Body.CanRead)
|
||||
Request.Body.Dispose();
|
||||
|
||||
response.SendChunked = false;
|
||||
response.ContentLength64 = buffer.Length;
|
||||
response.ContentEncoding = Encoding.UTF8;
|
||||
|
@ -111,6 +114,9 @@ namespace OpenSim.Framework.Servers.HttpServer
|
|||
OSHttpResponse response
|
||||
= new OSHttpResponse(new HttpResponse(HttpContext, Request), HttpContext);
|
||||
|
||||
if(Request.Body.CanRead)
|
||||
Request.Body.Dispose();
|
||||
|
||||
response.SendChunked = false;
|
||||
response.ContentLength64 = 0;
|
||||
response.ContentEncoding = Encoding.UTF8;
|
||||
|
|
Loading…
Reference in New Issue