From: Joe Orton
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).
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).