Merge "376519: Change compression type of deflate compression in GzipFilter and IncludableGzipFilter"

This commit is contained in:
Greg Wilkins 2012-04-12 03:14:53 -04:00 committed by Gerrit Code Review @ Eclipse.org
commit 9cc43c5f93
2 changed files with 4 additions and 2 deletions

View File

@ -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));
}
};
}

View File

@ -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));
}
};
}