tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 21933] New: - CompressionResponseStream creates Gzip before header
Date Mon, 28 Jul 2003 15:03:08 GMT
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: tomcat-dev@jakarta.apache.org
        ReportedBy: ckessel@tripwire.com


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: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message