Return-Path: Delivered-To: apmail-httpd-cvs-archive@www.apache.org Received: (qmail 7616 invoked from network); 15 Feb 2010 20:12:29 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 15 Feb 2010 20:12:29 -0000 Received: (qmail 89257 invoked by uid 500); 15 Feb 2010 20:12:29 -0000 Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org Received: (qmail 89160 invoked by uid 500); 15 Feb 2010 20:12:29 -0000 Mailing-List: contact cvs-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list cvs@httpd.apache.org Received: (qmail 89148 invoked by uid 99); 15 Feb 2010 20:12:29 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 15 Feb 2010 20:12:29 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 15 Feb 2010 20:12:28 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 73B0D238897A; Mon, 15 Feb 2010 20:12:08 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r910326 - /httpd/httpd/trunk/modules/filters/mod_deflate.c Date: Mon, 15 Feb 2010 20:12:08 -0000 To: cvs@httpd.apache.org From: sf@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20100215201208.73B0D238897A@eris.apache.org> Author: sf Date: Mon Feb 15 20:12:07 2010 New Revision: 910326 URL: http://svn.apache.org/viewvc?rev=910326&view=rev Log: Correctly handle the case where apr_brigade_partition() returns APR_INCOMPLETE and bkt points to the sentinel of ctx->proc_bb and not the sentinel of bb. Submitted by: Joe Schaefer Modified: httpd/httpd/trunk/modules/filters/mod_deflate.c Modified: httpd/httpd/trunk/modules/filters/mod_deflate.c URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/filters/mod_deflate.c?rev=910326&r1=910325&r2=910326&view=diff ============================================================================== --- httpd/httpd/trunk/modules/filters/mod_deflate.c (original) +++ httpd/httpd/trunk/modules/filters/mod_deflate.c Mon Feb 15 20:12:07 2010 @@ -1019,11 +1019,13 @@ } if (!APR_BRIGADE_EMPTY(ctx->proc_bb)) { - /* May return APR_INCOMPLETE which is fine by us. */ - apr_brigade_partition(ctx->proc_bb, readbytes, &bkt); - - APR_BRIGADE_CONCAT(bb, ctx->proc_bb); - apr_brigade_split_ex(bb, bkt, ctx->proc_bb); + if (apr_brigade_partition(ctx->proc_bb, readbytes, &bkt) == APR_INCOMPLETE) { + APR_BRIGADE_CONCAT(bb, ctx->proc_bb); + } + else { + APR_BRIGADE_CONCAT(bb, ctx->proc_bb); + apr_brigade_split_ex(bb, bkt, ctx->proc_bb); + } } return APR_SUCCESS;