summaryrefslogtreecommitdiff
path: root/server/util_filter.c
diff options
context:
space:
mode:
authorYann Ylavic <ylavic@apache.org>2018-07-18 22:40:32 +0000
committerYann Ylavic <ylavic@apache.org>2018-07-18 22:40:32 +0000
commit69fd1f06420a37e4595f3b7fb0c77e34d6cfc251 (patch)
tree4f98e8d7c352dd135a31b8ecc4566b6d23cb9d9c /server/util_filter.c
parent8d0a14e3e8f5fda68eedb74afc3ff4ec2f91d304 (diff)
downloadhttpd-69fd1f06420a37e4595f3b7fb0c77e34d6cfc251.tar.gz
core: avoid double loop in ap_filter_output_pending().
Since ap_filter_output_pending() is looping on the relevant filters already, we don't need to use ap_filter_should_yield() to check upstream filters. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1836240 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'server/util_filter.c')
-rw-r--r--server/util_filter.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/server/util_filter.c b/server/util_filter.c
index 22af83d8bc..5d35c96b10 100644
--- a/server/util_filter.c
+++ b/server/util_filter.c
@@ -1004,7 +1004,6 @@ AP_DECLARE(int) ap_filter_should_yield(ap_filter_t *f)
AP_DECLARE_NONSTD(int) ap_filter_output_pending(conn_rec *c)
{
- int data_in_output_filters = DECLINED;
apr_bucket_brigade *bb;
ap_filter_t *f;
@@ -1035,13 +1034,13 @@ AP_DECLARE_NONSTD(int) ap_filter_output_pending(conn_rec *c)
return rv;
}
- if (ap_filter_should_yield(f)) {
- data_in_output_filters = OK;
+ if (f->bb && !APR_BRIGADE_EMPTY(f->bb)) {
+ return OK;
}
}
}
- return data_in_output_filters;
+ return DECLINED;
}
AP_DECLARE_NONSTD(int) ap_filter_input_pending(conn_rec *c)