summaryrefslogtreecommitdiff
path: root/server/util_filter.c
diff options
context:
space:
mode:
authorYann Ylavic <ylavic@apache.org>2020-05-15 12:27:13 +0000
committerYann Ylavic <ylavic@apache.org>2020-05-15 12:27:13 +0000
commitc7e4735db9629f0ec4ca454f79dc3ef0ba0e3742 (patch)
tree99b11e8eff0facce8096c74e9ca3a5e4afe13d10 /server/util_filter.c
parent00977256ef92e5a1d29b9c9264d849ddd578d0a0 (diff)
downloadhttpd-c7e4735db9629f0ec4ca454f79dc3ef0ba0e3742.tar.gz
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. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1877785 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'server/util_filter.c')
-rw-r--r--server/util_filter.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/server/util_filter.c b/server/util_filter.c
index b71dcdf1ad..a6ab80124c 100644
--- a/server/util_filter.c
+++ b/server/util_filter.c
@@ -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;
}