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

Change-Id: I83ed4a43ad432502ef5d5ca52c0e7370d8a5dd9f
This commit is contained in:
Thomas Becker 2012-04-11 20:38:16 +02:00
parent 08573701ef
commit d98f699bea
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));
}
};
}