Return-Path: Delivered-To: apmail-httpd-cvs-archive@www.apache.org Received: (qmail 33641 invoked from network); 19 Mar 2007 20:05:19 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 19 Mar 2007 20:05:19 -0000 Received: (qmail 24612 invoked by uid 500); 19 Mar 2007 20:05:27 -0000 Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org Received: (qmail 24562 invoked by uid 500); 19 Mar 2007 20:05:27 -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 24551 invoked by uid 99); 19 Mar 2007 20:05:26 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 Mar 2007 13:05:26 -0700 X-ASF-Spam-Status: No, hits=-99.5 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 Mar 2007 13:05:18 -0700 Received: by eris.apache.org (Postfix, from userid 65534) id 5EF801A9838; Mon, 19 Mar 2007 13:04:57 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r520074 - /httpd/httpd/trunk/modules/experimental/mod_sedfilter.c Date: Mon, 19 Mar 2007 20:04:57 -0000 To: cvs@httpd.apache.org From: jim@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20070319200457.5EF801A9838@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: jim Date: Mon Mar 19 13:04:56 2007 New Revision: 520074 URL: http://svn.apache.org/viewvc?view=rev&rev=520074 Log: Some minor tweaks... return quickly if given an empty bb, ensure EOS is the last bucket we handle and if our chunked passing fails, then we need to report that immediately. Modified: httpd/httpd/trunk/modules/experimental/mod_sedfilter.c Modified: httpd/httpd/trunk/modules/experimental/mod_sedfilter.c URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/experimental/mod_sedfilter.c?view=diff&rev=520074&r1=520073&r2=520074 ============================================================================== --- httpd/httpd/trunk/modules/experimental/mod_sedfilter.c (original) +++ httpd/httpd/trunk/modules/experimental/mod_sedfilter.c Mon Mar 19 13:04:56 2007 @@ -277,6 +277,7 @@ apr_status_t rv; sed_module_ctx *ctx = f->ctx; + /* * First time around? Create the saved bb that we used for each pass * through. Note that we can also get here when we explicitly clear ctx, @@ -289,6 +290,12 @@ } /* + * Shortcircuit processing + */ + if (APR_BRIGADE_EMPTY(bb)) + return APR_SUCCESS; + + /* * Everything to be passed to the next filter goes in * here, our pass brigade. */ @@ -323,8 +330,10 @@ while ((b = APR_BRIGADE_FIRST(bb)) && (b != APR_BRIGADE_SENTINEL(bb))) { apr_brigade_length(passbb, 0, &blen); if ((blen != -1) && (blen > AP_MIN_BYTES_TO_WRITE)) { - ap_pass_brigade(f->next, passbb); + rv = ap_pass_brigade(f->next, passbb); apr_brigade_cleanup(passbb); + if (rv != APR_SUCCESS) + return rv; } if (APR_BUCKET_IS_EOS(b)) { /* @@ -342,6 +351,7 @@ apr_brigade_cleanup(ctx->ctxbb); APR_BUCKET_REMOVE(b); APR_BRIGADE_INSERT_TAIL(passbb, b); + break; } else if (APR_BUCKET_IS_METADATA(b)) { APR_BUCKET_REMOVE(b);