ap_filter_output_pending(): test where each filter should yield after running.
Since running a filter may pass data next to it, ap_filter_output_pending()
should test for ap_filter_should_yield(f->next) after each f call, otherwise
it won't take into account new pending data in filters it just walked.
@@ -1271,11 +1271,12 @@ AP_DECLARE_NONSTD(int) ap_filter_output_pending(conn_rec *c)
if (rv != APR_SUCCESS) {
ap_log_cerror(APLOG_MARK, APLOG_DEBUG, rv, c, APLOGNO(00470)
"write failure in '%s' output filter", f->frec->name);
- rc = rv;
+ rc = AP_FILTER_ERROR;
break;
}
- if (fp->bb && !APR_BRIGADE_EMPTY(fp->bb)) {
+ if ((fp->bb && !APR_BRIGADE_EMPTY(fp->bb))
+ || ap_filter_should_yield(f->next)) {
rc = OK;
break;
}
