Bug 57870

Summary: backport GzipOutputFilter #doWrite to Tomcat 7 to call GZIPOutputStream to enable flushing via reflection when running on Java 7+
Product: Tomcat 7 Reporter: j__n
Component: ConnectorsAssignee: Tomcat Developers Mailing List <dev>
Status: RESOLVED FIXED    
Severity: enhancement CC: j__n
Priority: P2 Keywords: Beginner
Version: 7.0.54   
Target Milestone: ---   
Hardware: PC   
OS: Linux   

Description j__n 2015-04-29 01:26:42 UTC
followup of https://bz.apache.org/bugzilla/show_bug.cgi?id=57866 (short version here)

FlushableGZIPOutputStream does not compress after the first flush() due to a bug in the JVM (already reported upstream).

As per https://bz.apache.org/bugzilla/show_bug.cgi?id=57866#c3 (Konstantin Kolinko):

> Tomcat 8 does not use FlushableGZIPOutputStream, but uses new Java7+ constructor for java.util.zip.GZIPOutputStream to enable flushing.

> It should be possible to backport that to Tomcat 7 to call that constructor via reflection when running on Java 7+.
Comment 1 Kapil 2017-10-17 18:53:19 UTC
Working on it, Please bear with me.
Comment 2 Mark Thomas 2017-11-30 13:42:49 UTC
This has been fixed for 7.0.83 onwards.