As Mark said (see 51475) here is the new bug record. Because it's not desirable and efficient to compress small packages, I've modified the GzipInterceptor that it compresses only packages with a size greater than 2048 bytes. Based on org.apache.coyote.http11.Http11Protocoll this value is user configurable. To distinguish if data is compressed or not, I've added a small one byte header, which defines if the data is compressed or not. I'm also recording some stats, which can be disabled.
It sounds like you have a patch. If you want to propose it, add it as an attachment to this issue.
I wonder if differentiation between compressed content and non-compressed content is why this hasn't been implemented before. I also wonder about the protocol change. New messages have been added the past (that will be ignored if not understood) but I don't recall actually changing the protocol.
Created attachment 27295 [details] Patch for this enhancement Here is the patch. I must have forgotten. I thougt I uploaded it when submitting the bug.
Apologies it took so long to return to this. I've applied a variation of the patch. The main changes were: - separate statsEnabled and interval (users might want stats via JMX without logging) - defaults same as current behaviour - added some Javadoc - used optionFlags to indicate if compression has been applied The fix has been applied to 9.0.x. I do not currently have plans to back-port it.