DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21933>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21933 CompressionResponseStream creates Gzip before header Summary: CompressionResponseStream creates Gzip before header Product: Tomcat 4 Version: 4.1.24 Platform: All OS/Version: All Status: NEW Severity: Major Priority: Other Component: Webapps:Examples AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] In CompressionResponseStream, the code does the following: gzipstream = new GZIPOutputStream(output); response.addHeader("Content-Encoding", "gzip"); If the output stream already contains enough data to trip the internal buffer and cause a write, then the addHeader() is ignored. The result is that the data is sent gzip'd, but the header doesn't indicate it. This causes mozilla to display garbage and IE to prompt for a download. Simply reversing the lines seems to fix the problem. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]