From 798c66469862f9df09113135cb2f7c03c92e6bc1 Mon Sep 17 00:00:00 2001 From: Greg Wilkins Date: Mon, 22 Mar 2010 23:17:28 +0000 Subject: [PATCH] JETTY-1174 Close rather than finish Gzipstreams to avoid JVM leak git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@1402 7e9141cc-0065-0410-87d8-b60c137991c4 --- VERSION.txt | 2 ++ .../java/org/eclipse/jetty/servlets/GzipFilter.java | 12 ++++++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/VERSION.txt b/VERSION.txt index 3c39f23f299..b2b85426830 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -45,7 +45,9 @@ jetty-7.0.2.RC0 + JETTY-1179 Persistant session tables created on MySQL use wrong datatype + JETTY-1184 shrink thread pool even with frequent small jobs + JETTY-1133 Handle multiple URL ; parameters + + JETTY-1174 Close rather than finish Gzipstreams to avoid JVM leak + JETTY-1192 Fixed Digested POST + + JETTY-1199 FindBugs cleanups + COMETD-46 reset ContentExchange response content on resend + Added IPAccessHandler + Updated Servlet3Continuation to final 3.0.20100224 diff --git a/jetty-servlets/src/main/java/org/eclipse/jetty/servlets/GzipFilter.java b/jetty-servlets/src/main/java/org/eclipse/jetty/servlets/GzipFilter.java index 5a090b9c24b..b77d783c4c3 100644 --- a/jetty-servlets/src/main/java/org/eclipse/jetty/servlets/GzipFilter.java +++ b/jetty-servlets/src/main/java/org/eclipse/jetty/servlets/GzipFilter.java @@ -485,8 +485,9 @@ public class GzipFilter extends UserAgentFilter } if (_gzOut!=null) - _gzOut.finish(); - _out.close(); + _gzOut.close(); + else + _out.close(); _closed=true; } } @@ -503,8 +504,11 @@ public class GzipFilter extends UserAgentFilter doGzip(); } - if (_gzOut!=null) - _gzOut.finish(); + if (_gzOut!=null && !_closed) + { + _closed=true; + _gzOut.close(); + } } }