|Summary:||Calling flush() on servlet response print writer while compression is enabled produces corrupted response|
|Product:||Tomcat 7||Reporter:||Ayman Madkour <ayman.madkour>|
|Component:||Catalina||Assignee:||Tomcat Developers Mailing List <dev>|
|Attachments:||A sample servlet code to reproduce the issue|
Description Ayman Madkour 2017-10-24 13:04:48 UTC
Created attachment 35453 [details] A sample servlet code to reproduce the issue The issue happens only on Oracle JDK 8 update 151/152, not before. Calling flush() on servlet response print writer while compression is enabled produces corrupted response. See attached servlet.
Comment 1 Remy Maucherat 2017-10-24 13:14:23 UTC
As a side note, without looking at the merits of the BZ, I'd like to point out that the very common habit of doing flush and/or close at the end of a servlet is a bad idea, it may impair better error processing and will always degrade performance.
Comment 2 Mark Thomas 2017-10-24 19:57:48 UTC
This is a know issue with the JRE and will fixed in the next JRE release. https://bugs.openjdk.java.net/browse/JDK-8189788