users@glassfish.java.net

Glassfish double compression

From: <forums_at_java.net>
Date: Wed, 14 Nov 2012 00:36:58 -0600 (CST)

We've recently upgraded from Glassfish 2.1 to 3.1.2.2 and are finding issues
where Glassfish double compresses output (or at least that is what I assume
is happening). We deploy some WARs that already have Servlet Filters which
take care of GZip compression. We also are using Tuckey UrlrewriteFilter to
do some Url rewriting and this filter also seems to do Gzip compression. For
both these cases we cannot switch off the compression behavior easily.
However, there is a lot of other html,js,css content that we'd also like to
have compressed. With Glassfish 2.1 we switched on compression and all was
well. Glassfish compressed all html, js, css, etc. and ignored content that
was already compressed by these other filters. With Glassfish 3.1.2.2 any
stream that is already compressed by these other Servlet Filters comes out
garbled. Other content not compressed by these filters comes out fine and is
compressed. I can only assume that Glassfish is not detecting that the stream
is already gzipped and is gzipping it again. Is there any way to modify this
behaviour? Is this a bug? Thanks.

--
[Message sent by forum member 'arosso']
View Post: http://forums.java.net/node/892262