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 3BC0F19630 for ; Mon, 29 Feb 2016 14:11:49 +0000 (UTC) Received: (qmail 47840 invoked by uid 500); 29 Feb 2016 14:11:48 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 47771 invoked by uid 500); 29 Feb 2016 14:11:48 -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 47759 invoked by uid 99); 29 Feb 2016 14:11:48 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 29 Feb 2016 14:11:48 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id EECABC0140 for ; Mon, 29 Feb 2016 14:11:47 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.471 X-Spam-Level: * X-Spam-Status: No, score=1.471 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-0.329] autolearn=disabled Received: from mx2-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id d54bQRMm7VDr for ; Mon, 29 Feb 2016 14:11:47 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx2-lw-eu.apache.org (ASF Mail Server at mx2-lw-eu.apache.org) with ESMTP id 742485F1D5 for ; Mon, 29 Feb 2016 14:11:46 +0000 (UTC) Received: from svn01-us-west.apache.org (svn.apache.org [10.41.0.6]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 862EBE0163 for ; Mon, 29 Feb 2016 14:11:45 +0000 (UTC) Received: from svn01-us-west.apache.org (localhost [127.0.0.1]) by svn01-us-west.apache.org (ASF Mail Server at svn01-us-west.apache.org) with ESMTP id 85A233A0292 for ; Mon, 29 Feb 2016 14:11:45 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1732900 - in /tomcat/trunk: java/org/apache/tomcat/websocket/PerMessageDeflate.java webapps/docs/changelog.xml Date: Mon, 29 Feb 2016 14:11:45 -0000 To: dev@tomcat.apache.org From: markt@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20160229141145.85A233A0292@svn01-us-west.apache.org> Author: markt Date: Mon Feb 29 14:11:45 2016 New Revision: 1732900 URL: http://svn.apache.org/viewvc?rev=1732900&view=rev Log: Correctly handle compression of partial messages when the final message fragment has a zero length payload. Problem identified by Autobahn test suite. Modified: tomcat/trunk/java/org/apache/tomcat/websocket/PerMessageDeflate.java tomcat/trunk/webapps/docs/changelog.xml Modified: tomcat/trunk/java/org/apache/tomcat/websocket/PerMessageDeflate.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/PerMessageDeflate.java?rev=1732900&r1=1732899&r2=1732900&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/tomcat/websocket/PerMessageDeflate.java (original) +++ tomcat/trunk/java/org/apache/tomcat/websocket/PerMessageDeflate.java Mon Feb 29 14:11:45 2016 @@ -321,7 +321,8 @@ public class PerMessageDeflate implement // Control messages can appear in the middle of other messages // and must not be compressed. Pass it straight through allCompressedParts.add(uncompressedPart); - } else if (uncompressedPart.getPayload().limit() == 0) { + } else if (uncompressedPart.getPayload().limit() == 0 && uncompressedPart.isFin() && + deflater.getBytesRead() == 0) { // Zero length messages can't be compressed so pass them // straight through. allCompressedParts.add(uncompressedPart); Modified: tomcat/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1732900&r1=1732899&r2=1732900&view=diff ============================================================================== --- tomcat/trunk/webapps/docs/changelog.xml (original) +++ tomcat/trunk/webapps/docs/changelog.xml Mon Feb 29 14:11:45 2016 @@ -164,6 +164,10 @@ being thrown for an incomplete message even through the message was completed. (markt) + + Correctly handle compression of partial messages when the final message + fragment has a zero length payload. (markt) + --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org For additional commands, e-mail: dev-help@tomcat.apache.org