]> git.ipfire.org Git - thirdparty/apache/httpd.git/commit
core: follow up to r1891148: WC bucket defaulting to FLUSH bucket.
authorYann Ylavic <ylavic@apache.org>
Fri, 20 Aug 2021 09:36:19 +0000 (09:36 +0000)
committerYann Ylavic <ylavic@apache.org>
Fri, 20 Aug 2021 09:36:19 +0000 (09:36 +0000)
commit324ae13e8ee714c2c7a8377d98ea6f9aa1722428
treea9b244c19bbc71c535ab01cb0b79722ce0963b01
parent8f8793bcc6e5b3c369d336c148003ba1f63df606
core: follow up to r1891148: WC bucket defaulting to FLUSH bucket.

Define WC bucket semantics as:
/**
 * @brief Write Completion (WC) bucket
 *
 * A WC bucket is a FLUSH bucket with special ->data == &ap_bucket_wc_data,
 * still both AP_BUCKET_IS_WC() and APR_BUCKET_IS_FLUSH() hold for them so
 * they have the same semantics for most filters, namely:
 *   Everything produced before shall be passed to the next filter, including
 *   the WC/FLUSH bucket itself.
 * The distinction between WC and FLUSH buckets is only for filters that care
 * about write completion (calling ap_filter_reinstate_brigade() with non-NULL
 * flush_upto), those can setaside WC buckets and the preceding data provided
 * they have first determined that the next filter(s) have pending data
 * already, usually by calling ap_filter_should_yield(f->next).
 */

The only filters that care about write completion for now are
ap_core_output_filter() and ssl_io_filter_output(), which try to fill
in the pipe as much as possible, using ap_filter_reinstate_brigade(&flush_upto)
to determine whether they should flush (blocking) or setaside their remaining
data.

So ap_filter_reinstate_brigade() is made to not treat WC as FLUSH buckets and
keep the above filters working as before (and correctly w.r.t. above WC bucket
semantics).

* include/ap_mmn.h, include/util_filter.h:
  Axe specific ap_bucket_type_wc and define global &ap_bucket_wc_data address to
  mark WC buckets checked by AP_BUCKET_IS_WC().

* server/util_filter.c (ap_filter_reinstate_brigade):
  Don't treat WC buckets as FLUSH buckets.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1892468 13f79535-47bb-0310-9956-ffa450edef68
include/ap_mmn.h
include/util_filter.h
modules/proxy/proxy_util.c
server/util_filter.c