struct core_output_filter_ctx {
apr_bucket_brigade *tmp_flush_bb;
+ apr_bucket_brigade *empty_bb;
apr_size_t bytes_written;
};
ctx->tmp_flush_bb = apr_brigade_create(c->pool, c->bucket_alloc);
}
+ /* remain compatible with legacy MPMs that passed NULL to this filter */
+ if (bb == NULL) {
+ if (ctx->empty_bb == NULL) {
+ ctx->empty_bb = apr_brigade_create(c->pool, c->bucket_alloc);
+ }
+ bb = ctx->empty_bb;
+ }
+
/* Scan through the brigade and decide whether to attempt a write,
* and how much to write, based on the following rules:
*