From b1157e7756606fd6949f37af66576885db106bbb Mon Sep 17 00:00:00 2001 From: "William A. Rowe Jr" Date: Fri, 28 Sep 2007 03:22:42 +0000 Subject: [PATCH] Well this always sucks, to build a good example and discover the simple example case doesn't actually work :) Stop returning their buckets to the caller, only to have the caller send us the same buckets on subsequent calls to our case_filter. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@580206 13f79535-47bb-0310-9956-ffa450edef68 --- modules/experimental/mod_case_filter.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/modules/experimental/mod_case_filter.c b/modules/experimental/mod_case_filter.c index 04aeb70348..be64f2fb0c 100644 --- a/modules/experimental/mod_case_filter.c +++ b/modules/experimental/mod_case_filter.c @@ -91,7 +91,16 @@ static apr_status_t CaseFilterOutFilter(ap_filter_t *f, APR_BRIGADE_INSERT_TAIL(pbbOut,pbktOut); } - /* XXX: is there any advantage to passing a brigade for each bucket? */ + /* Q: is there any advantage to passing a brigade for each bucket? + * A: obviously, it can cut down server resource consumption, if this + * experimental module was fed a file of 4MB, it would be using 8MB for + * the 'read' buckets and the 'write' buckets. + * + * Note it is more efficient to consume (destroy) each bucket as it's + * processed above than to do a single cleanup down here. In any case, + * don't let our caller pass the same buckets to us, twice; + */ + ap_briade_cleanup(pbbIn); return ap_pass_brigade(f->next,pbbOut); } -- 2.40.0