--On Monday, April 25, 2005 12:47 PM -0500 Rici Lake <[EMAIL PROTECTED]> wrote:

Regardless of any other changes to the brigade API, this seems to me to
be a good idea:

Index: util_filter.c
===================================================================
--- util_filter.c       (revision 158730)
+++ util_filter.c       (working copy)
@@ -500,6 +500,7 @@
  AP_DECLARE(apr_status_t) ap_pass_brigade(ap_filter_t *next,
                                           apr_bucket_brigade *bb)
  {
+    apr_status_t result = AP_NOBODY_WROTE;
      if (next) {
          apr_bucket *e;
          if ((e = APR_BRIGADE_LAST(bb)) && APR_BUCKET_IS_EOS(e) &&
next->r) {
@@ -523,9 +524,10 @@
                  }
              }
          }
-        return next->frec->filter_func.out_func(next, bb);
+        result = next->frec->filter_func.out_func(next, bb);
+        apr_brigade_cleanup(bb);
      }
-    return AP_NOBODY_WROTE;
+    return result;
  }

This introduces a really large overhead as we'd be calling the cleanup for *every* output filter we invoke. So, -0.9999. -- justin




Reply via email to