Return-Path: X-Original-To: apmail-tomcat-dev-archive@www.apache.org Delivered-To: apmail-tomcat-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1C3AE7EB3 for ; Tue, 1 Nov 2011 22:15:41 +0000 (UTC) Received: (qmail 90264 invoked by uid 500); 1 Nov 2011 22:15:40 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 90196 invoked by uid 500); 1 Nov 2011 22:15:40 -0000 Mailing-List: contact dev-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Developers List" Delivered-To: mailing list dev@tomcat.apache.org Received: (qmail 90187 invoked by uid 99); 1 Nov 2011 22:15:40 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Nov 2011 22:15:40 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.115] (HELO eir.zones.apache.org) (140.211.11.115) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Nov 2011 22:15:39 +0000 Received: by eir.zones.apache.org (Postfix, from userid 80) id 1CE3448F62; Tue, 1 Nov 2011 22:15:19 +0000 (UTC) From: bugzilla@apache.org To: dev@tomcat.apache.org Subject: DO NOT REPLY [Bug 52121] New: corrupt gzip output when compression=on in server.xml Date: Tue, 01 Nov 2011 22:15:16 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Tomcat 7 X-Bugzilla-Component: Connectors X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: dmarcks@amazon.com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: dev@tomcat.apache.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: https://issues.apache.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 https://issues.apache.org/bugzilla/show_bug.cgi?id=3D52121 Bug #: 52121 Summary: corrupt gzip output when compression=3Don in server.xml Product: Tomcat 7 Version: 7.0.22 Platform: PC OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: Connectors AssignedTo: dev@tomcat.apache.org ReportedBy: dmarcks@amazon.com Classification: Unclassified Created attachment 27886 --> https://issues.apache.org/bugzilla/attachment.cgi?id=3D27886 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 above. As mentioned in the post, this seems to have arisen with this issue: https://issues.apache.org/bugzilla/show_bug.cgi?id=3D48738 The change introduced this class: FlushableGZIPOutputStream. When we started using this, we noticed that certain string flush sequences would result in corrupt gzip output.=20 The attached WAR provides a repro. The sequence of writes to the output str= eam that would=E2=80=99ve been done by our server is mimicked in this case usin= g a file system. There are 40 files each representing a flush. URL: "http://localhost:8080/TomcatBugReportWAR" I=E2=80=99ve allowed the =E2=80=98start=E2=80=99 and =E2=80=98end=E2=80=99 = request parameters to control to the starting and ending points. I=E2=80=99ve also allowed an =E2=80=98append=E2= =80=99 request parameter dump anything to the outputstream. The defaults are 0, 40, and =E2=80=9C=E2=80=9D for start end and append res= pectively. 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: "http://localhost:8080/TomcatBugReportWAR?start=3D19&end=3D30&append=3Dsome= thing=E2=80=9D It=E2=80=99s also possible to reproduce this using only the FlushableGZIPOu= tputStream without using Tomcat at all. See attached JAR. --=20 Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=3De= mail ------- You are receiving this mail because: ------- You are the assignee for the bug.= --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org For additional commands, e-mail: dev-help@tomcat.apache.org