From: Joe Orton Date: Wed, 2 Jun 2010 14:53:07 +0000 (+0000) Subject: - clarify wording on handling of empty brigades, see dev@ thread from X-Git-Tag: 2.3.6~73 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3880cb99d4bcb66d41a3426a39c84c8249ed9a1c;p=apache - clarify wording on handling of empty brigades, see dev@ thread from msgid git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@950583 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/docs/manual/developer/output-filters.html.en b/docs/manual/developer/output-filters.html.en index 6c60c1ad4f..1aca7f2957 100644 --- a/docs/manual/developer/output-filters.html.en +++ b/docs/manual/developer/output-filters.html.en @@ -120,8 +120,11 @@ ignored.

An output filter should never pass an empty brigade down the - filter chain. But, for good defensive programming, filters should - be prepared to accept an empty brigade, and do nothing.

+ filter chain. To be defensive, filters should be prepared to + accept an empty brigade, and should return success without passing + this brigade on down the filter chain. The handling of an empty + brigade should have no side effects (such as changing any state + private to the filter).

How to handle an empty brigade

apr_status_t dummy_filter(ap_filter_t *f, apr_bucket_brigade *bb)
diff --git a/docs/manual/developer/output-filters.xml b/docs/manual/developer/output-filters.xml index 046ef99022..5d813ef299 100644 --- a/docs/manual/developer/output-filters.xml +++ b/docs/manual/developer/output-filters.xml @@ -114,8 +114,11 @@ ignored.

An output filter should never pass an empty brigade down the - filter chain. But, for good defensive programming, filters should - be prepared to accept an empty brigade, and do nothing.

+ filter chain. To be defensive, filters should be prepared to + accept an empty brigade, and should return success without passing + this brigade on down the filter chain. The handling of an empty + brigade should have no side effects (such as changing any state + private to the filter).

How to handle an empty brigade apr_status_t dummy_filter(ap_filter_t *f, apr_bucket_brigade *bb)