aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Becker2012-04-11 14:38:16 (EDT)
committerThomas Becker2012-04-11 14:38:16 (EDT)
commitd98f699bea4a8ee62e01a3c32d0f8feda4e1fc62 (patch)
tree5cac1a8ca14af99410034cb61d293174fbbdfad7
parent08573701efc447fb95da22bfc711f79b6908a60e (diff)
downloadorg.eclipse.jetty.project-d98f699bea4a8ee62e01a3c32d0f8feda4e1fc62.zip
org.eclipse.jetty.project-d98f699bea4a8ee62e01a3c32d0f8feda4e1fc62.tar.gz
org.eclipse.jetty.project-d98f699bea4a8ee62e01a3c32d0f8feda4e1fc62.tar.bz2
376519: Change compression type of deflate compression in GzipFilter and IncludableGzipFilterrefs/changes/64/5564/1
-rw-r--r--jetty-servlets/src/main/java/org/eclipse/jetty/servlets/GzipFilter.java3
-rw-r--r--jetty-servlets/src/main/java/org/eclipse/jetty/servlets/IncludableGzipFilter.java3
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 650632b..f30ff41 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 972393e..95de423 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));
}
};
}