416096 DefaultServlet leaves open file descriptors with file sizes greater than response buffer
This commit is contained in:
parent
ef166c23e6
commit
35d379a335
|
@ -478,6 +478,7 @@ public class HttpOutput extends ServletOutputStream
|
||||||
if (_eof)
|
if (_eof)
|
||||||
{
|
{
|
||||||
// Handle EOF
|
// Handle EOF
|
||||||
|
_in.close();
|
||||||
closed();
|
closed();
|
||||||
_channel.getByteBufferPool().release(_buffer);
|
_channel.getByteBufferPool().release(_buffer);
|
||||||
return true;
|
return true;
|
||||||
|
@ -489,7 +490,6 @@ public class HttpOutput extends ServletOutputStream
|
||||||
{
|
{
|
||||||
_eof=true;
|
_eof=true;
|
||||||
len=0;
|
len=0;
|
||||||
_in.close();
|
|
||||||
}
|
}
|
||||||
else if (len<_buffer.capacity())
|
else if (len<_buffer.capacity())
|
||||||
{
|
{
|
||||||
|
@ -552,6 +552,7 @@ public class HttpOutput extends ServletOutputStream
|
||||||
{
|
{
|
||||||
if (_eof)
|
if (_eof)
|
||||||
{
|
{
|
||||||
|
_in.close();
|
||||||
closed();
|
closed();
|
||||||
_channel.getByteBufferPool().release(_buffer);
|
_channel.getByteBufferPool().release(_buffer);
|
||||||
return true;
|
return true;
|
||||||
|
@ -563,8 +564,7 @@ public class HttpOutput extends ServletOutputStream
|
||||||
if (len<0)
|
if (len<0)
|
||||||
{
|
{
|
||||||
_eof=true;
|
_eof=true;
|
||||||
len=0;
|
len=0;
|
||||||
_in.close();
|
|
||||||
}
|
}
|
||||||
else if (len<_buffer.capacity())
|
else if (len<_buffer.capacity())
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue