tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject DO NOT REPLY [Bug 52121] New: corrupt gzip output when compression=on in server.xml
Date Tue, 01 Nov 2011 22:15:16 GMT

             Bug #: 52121
           Summary: corrupt gzip output when compression=on in server.xml
           Product: Tomcat 7
           Version: 7.0.22
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Connectors
    Classification: Unclassified

Created attachment 27886
Gzip Corruption Repro WAR

This appears to be same issue as posted by Christopher Taylor
Jun 30, 2011 at 8:05 am to Tomcat Users. The subject line has been preserved

As mentioned in the post, this seems to have arisen with this issue:

The change introduced this class: FlushableGZIPOutputStream. When we started
using this, we noticed that certain string flush sequences would result in
corrupt gzip output. 

The attached WAR provides a repro. The sequence of writes to the output stream
that would’ve been done by our server is mimicked in this case using a file
system. There are 40 files each representing a flush. URL:


I’ve allowed the ‘start’ and ‘end’ request parameters to control to the
starting and ending points. I’ve also allowed an ‘append’ request parameter
dump anything to the outputstream.

The defaults are 0, 40, and “” for start end and append respectively.

The following query string appears particularly interesting as it seems to be
the smallest sequence that causes the corruption and the subsequent string that
is appended after the output is the only thing that appears corrupted:


It’s also possible to reproduce this using only the FlushableGZIPOutputStream
without using Tomcat at all. See attached JAR.

Configure bugmail:
------- You are receiving this mail because: -------
You are the assignee for the bug.
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message