-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Chris,

On 6/30/2011 11:05 AM, Christopher Taylor wrote:
> While it works great, we encountered a response
> that consistently returned a corrupted gzip stream in the response
> (inside the zip file attached to this message to make sure that it's
> not transparently decompressed by accident).

Could you pare this down to a super-simple test case? If so, log a new
issue in Bugzilla and attach that test case as a complete WAR file so we
can reproduce it.

> What is interesting about the broken response is that the compressed
> data contains an uncompressed fragment at the end, followed by some
> more binary data. I looked around and found that
> org.apache.coyote.http11.filters.FlushableGZIPOutputStream seems to
> force flushing the stream by switching the compression method to
> NO_COMPRESSION and back again to DEFAULT_COMPRESSION -- I wonder if
> this is the cause?

That certainly sounds plausible.

Have you tried other TC versions where this same file works?

> Google yielded two bugs that seem to be related:
> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4813885 deals with
> flushing Gzip streams and
> https://issues.apache.org/bugzilla/show_bug.cgi?id=48738 seems to
> track the introduction of FlushableGZIPOutputStream into tomcat.

I wonder if you are hitting some super-special edge case, like you are
flushing when the buffer has nothing in it (due to the buffer having
just been flushed naturally) or something like that.

I have to imagine that flushing a GZIPOutputStream is tricky business
because you want gzip to complete it's current block (so it can actually
flush) but also be prepared to continue the stream afterward.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk4M4FEACgkQ9CaO5/Lv0PDpqACfesDaPACMyl5nD8bJBd2RZHJA
dG4AnAhyct79YRvFXaSOAzl9+aZGRvGQ
=MrFd
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to