I'm using 4.1.23 and gzip is not working if I use compression="on", but only if compression="force". I think it is in this piece of code: http11/src/java/org/apache/coyote/http11/Http11Processor.java:1130 if ((contentLength == -1) || (contentLength > compressionMinSize)) // Check for compatible MIME-TYPE if (compressableMimeTypes != null) return (inStringArray(compressableMimeTypes, response.getContentType())); } I don't have the possibility to compile and test everything, but I think response.getContentType() returns "text/html;charset=iso-8859-1" and inStringArray compares this to "text/html" which returns false. And maybe bug 2820 can be closed if this works.
Created attachment 5385 [details] Add method to extract the mime type from a content type. Everything before the first ";".
Created attachment 5386 [details] Remove the charset from the content type.
I've added two (untested) simple patches which might solve this problem. Can somebody look at it and commit it (or not)?
Created attachment 5489 [details] New tested patch.
Created attachment 5491 [details] New tested patch.
I made two new patches which replace the first two. These are tested and known to be working. These patches fix the handling of content-types for gzip compression. Is somebody willing to look at this and maybe commit it?
Alternative patches have been applied (4.1.28 onwards) which should resolve the issues you are seeing.