diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/handler/gzip/GzipHandler.java b/jetty-server/src/main/java/org/eclipse/jetty/server/handler/gzip/GzipHandler.java index 43d5f6df882..38f59154f07 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/handler/gzip/GzipHandler.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/handler/gzip/GzipHandler.java @@ -610,9 +610,13 @@ public class GzipHandler extends HandlerWrapper implements GzipFactory @Override public void recycle(Deflater deflater) { - deflater.reset(); if (_deflater.get()==null) + { + deflater.reset(); _deflater.set(deflater); + } + else + deflater.end(); } /* ------------------------------------------------------------ */