You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2017/11/30 13:45:48 UTC
svn commit: r1816713 -
/tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/filters/GzipOutputFilter.java
Author: markt
Date: Thu Nov 30 13:45:48 2017
New Revision: 1816713
URL: http://svn.apache.org/viewvc?rev=1816713&view=rev
Log:
Follow-on to r1816712
Modified:
tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/filters/GzipOutputFilter.java
Modified: tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/filters/GzipOutputFilter.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/filters/GzipOutputFilter.java?rev=1816713&r1=1816712&r2=1816713&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/filters/GzipOutputFilter.java (original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/filters/GzipOutputFilter.java Thu Nov 30 13:45:48 2017
@@ -139,10 +139,14 @@ public class GzipOutputFilter implements
* buffer.doWrite during the execution of this method.
*/
@Override
- public long end()
- throws IOException {
+ public long end() throws IOException {
if (compressionStream == null) {
- compressionStream = new FlushableGZIPOutputStream(fakeOutputStream);
+ if (JreCompat.isJre7Available()) {
+ compressionStream =
+ JreCompat.getInstance().getFlushableGZipOutputStream(fakeOutputStream);
+ } else {
+ compressionStream = new FlushableGZIPOutputStream(fakeOutputStream);
+ }
}
compressionStream.finish();
compressionStream.close();
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org