Created attachment 24979 [details] patch for the making GzipOutputFilter work with early flush As part of our site speed optimizations (at Linkedin) we bumped into a problem when trying to do partial flush of compressed content stream from Tomcat to the browser. We discovered the root cause to be a couple of long outstanding JDK bugs: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4255743 http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4813885 Basically, with the GzipOutputFilter turned on, the GZIPOutputStream it uses internally buffers the data that's been sent over, and does not flush to client (browser) when flushBuffer() is invoked. We have produced a patch which we verified internally, that it did work to do a partial flush on the compressed stream. We also have a unit testcase included in the patch to quickly show the problem. Early flush is a quite useful technique that many sites out there can benefit from to speed up the page download/rendering time, and by having it working in tomcat would benefit the existing and new customers. Thanks!
Thank you for the patch. I updated Summary and Severity of this issue.
The patch (with some slight modifications) has been applied to trunk and will be included in 7.0.3 onwards.
Created attachment 25932 [details] Port of TC7 patch for Tomact 6 I'll propose this patch for 6.0.x
Patch has been applied to 6.0.x and will be included in 6.0.30 onwards. Thanks again for your efforts.