From 35d379a33515ee3472c5bcab9bb77fcb4ae64510 Mon Sep 17 00:00:00 2001 From: Jan Bartel Date: Thu, 29 Aug 2013 12:16:38 +1000 Subject: [PATCH] 416096 DefaultServlet leaves open file descriptors with file sizes greater than response buffer --- .../src/main/java/org/eclipse/jetty/server/HttpOutput.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/HttpOutput.java b/jetty-server/src/main/java/org/eclipse/jetty/server/HttpOutput.java index 22248b3ed07..d12dee756c0 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/HttpOutput.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/HttpOutput.java @@ -478,6 +478,7 @@ public class HttpOutput extends ServletOutputStream if (_eof) { // Handle EOF + _in.close(); closed(); _channel.getByteBufferPool().release(_buffer); return true; @@ -489,7 +490,6 @@ public class HttpOutput extends ServletOutputStream { _eof=true; len=0; - _in.close(); } else if (len<_buffer.capacity()) { @@ -552,6 +552,7 @@ public class HttpOutput extends ServletOutputStream { if (_eof) { + _in.close(); closed(); _channel.getByteBufferPool().release(_buffer); return true; @@ -563,8 +564,7 @@ public class HttpOutput extends ServletOutputStream if (len<0) { _eof=true; - len=0; - _in.close(); + len=0; } else if (len<_buffer.capacity()) {