]> granicus.if.org Git - apache/commitdiff
- clarify wording on handling of empty brigades, see dev@ thread from
authorJoe Orton <jorton@apache.org>
Wed, 2 Jun 2010 14:53:07 +0000 (14:53 +0000)
committerJoe Orton <jorton@apache.org>
Wed, 2 Jun 2010 14:53:07 +0000 (14:53 +0000)
  msgid <AANLkTimaQNuUnDhhL0yoBJXNWS0c163HUWM9WHZhmFLh@mail.gmail.com>

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@950583 13f79535-47bb-0310-9956-ffa450edef68

docs/manual/developer/output-filters.html.en
docs/manual/developer/output-filters.xml

index 6c60c1ad4fb5d1908232077ce3a83c13d4ecfad2..1aca7f29578fe5b48dfc187f3992b7ed498b122c 100644 (file)
     ignored.</p>
 
     <p>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.</p>
+    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).</p>
 
     <div class="example"><h3>How to handle an empty brigade</h3><p><code>
     apr_status_t dummy_filter(ap_filter_t *f, apr_bucket_brigade *bb)<br />
index 046ef990225a3d4ad17a40b8675b7418d34e9abb..5d813ef299d32692f19fb6342b675257874dbf38 100644 (file)
     ignored.</p>
 
     <p>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.</p>
+    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).</p>
 
     <example><title>How to handle an empty brigade</title>
     apr_status_t dummy_filter(ap_filter_t *f, apr_bucket_brigade *bb)<br />