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