From d98f699bea4a8ee62e01a3c32d0f8feda4e1fc62 Mon Sep 17 00:00:00 2001 From: Thomas Becker Date: Wed, 11 Apr 2012 20:38:16 +0200 Subject: [PATCH] 376519: Change compression type of deflate compression in GzipFilter and IncludableGzipFilter Change-Id: I83ed4a43ad432502ef5d5ca52c0e7370d8a5dd9f --- .../src/main/java/org/eclipse/jetty/servlets/GzipFilter.java | 3 ++- .../java/org/eclipse/jetty/servlets/IncludableGzipFilter.java | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) 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 650632b7f38..f30ff4189ca 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 @@ -17,6 +17,7 @@ import java.util.HashSet; import java.util.Set; import java.util.StringTokenizer; import java.util.regex.Pattern; +import java.util.zip.Deflater; import java.util.zip.DeflaterOutputStream; import java.util.zip.GZIPOutputStream; @@ -255,7 +256,7 @@ public class GzipFilter extends UserAgentFilter @Override protected DeflaterOutputStream createStream() throws IOException { - return new DeflaterOutputStream(_response.getOutputStream()); + return new DeflaterOutputStream(_response.getOutputStream(),new Deflater(Deflater.DEFAULT_COMPRESSION)); } }; } diff --git a/jetty-servlets/src/main/java/org/eclipse/jetty/servlets/IncludableGzipFilter.java b/jetty-servlets/src/main/java/org/eclipse/jetty/servlets/IncludableGzipFilter.java index 972393e1644..95de423bc4b 100644 --- a/jetty-servlets/src/main/java/org/eclipse/jetty/servlets/IncludableGzipFilter.java +++ b/jetty-servlets/src/main/java/org/eclipse/jetty/servlets/IncludableGzipFilter.java @@ -18,6 +18,7 @@ import java.io.OutputStream; import java.io.OutputStreamWriter; import java.io.PrintWriter; import java.io.UnsupportedEncodingException; +import java.util.zip.Deflater; import java.util.zip.DeflaterOutputStream; import java.util.zip.GZIPOutputStream; @@ -94,7 +95,7 @@ public class IncludableGzipFilter extends GzipFilter @Override protected DeflaterOutputStream createStream() throws IOException { - return new DeflaterOutputStream(_response.getOutputStream()); + return new DeflaterOutputStream(_response.getOutputStream(),new Deflater(Deflater.DEFAULT_COMPRESSION)); } }; }