Bug 39572

Summary: fixes to use CompressionFilter in WebSphere app server
Product: Tomcat 5 Reporter: Eric Hedstr <erich>
Component: Webapps:ExamplesAssignee: Tomcat Developers Mailing List <dev>
Status: RESOLVED FIXED    
Severity: normal Keywords: PatchAvailable
Priority: P3    
Version: 5.5.17   
Target Milestone: ---   
Hardware: Other   
OS: other   
Attachments: patch to not compress committed response stream
avoid NullPointerException when flushing before writing

Description Eric Hedstr 2006-05-12 22:28:57 UTC
There are a couple of small bugs in the compression filter classes that are
triggered by using the filter in WebSphere 5.1 or 6. Here are patches.

- CompressionResponseStream should not compress the output stream if the
response has been committed (because then it cannot write the Content-Encoding:
gzip header, and the browser displays the compressed output as-is)
- CompressionServletResponseWrapper causes a NullPointerException if you flush
before writing anything
Comment 1 Eric Hedstr 2006-05-12 22:30:00 UTC
Created attachment 18266 [details]
patch to not compress committed response stream
Comment 2 Eric Hedstr 2006-05-12 22:32:33 UTC
Created attachment 18267 [details]
avoid NullPointerException when flushing before writing
Comment 3 Mark Thomas 2007-01-14 15:23:44 UTC
Many thanks for the patches. The NPE had already been fixed. I applied the
remaining patch to svn and it will be included in 5.5.21 onwards.