diff options
author | Joe Orton <jorton@apache.org> | 2021-10-12 08:13:29 +0000 |
---|---|---|
committer | Joe Orton <jorton@apache.org> | 2021-10-12 08:13:29 +0000 |
commit | 857df905d21fbf7133c4192bc496a4fcb164d23a (patch) | |
tree | fccb9a4664cbc7c400e3dd2b176c6ab4126312f3 | |
parent | 7b205dd8ff3c20f0c261509c32c0c99b8b699d6f (diff) | |
download | httpd-857df905d21fbf7133c4192bc496a4fcb164d23a.tar.gz |
Merge r1782986 from trunk:
util_filter: better ap_pass_brigade() vs empty brigades.
Submitted by: ylavic
Reviewed by: jorton, rpluem, ylavic
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1894150 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | server/util_filter.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/server/util_filter.c b/server/util_filter.c index 51e24f67e8..664f649b39 100644 --- a/server/util_filter.c +++ b/server/util_filter.c @@ -565,8 +565,9 @@ AP_DECLARE(apr_status_t) ap_pass_brigade(ap_filter_t *next, apr_bucket_brigade *bb) { if (next) { - apr_bucket *e; - if ((e = APR_BRIGADE_LAST(bb)) && APR_BUCKET_IS_EOS(e) && next->r) { + apr_bucket *e = APR_BRIGADE_LAST(bb); + + if (e != APR_BRIGADE_SENTINEL(bb) && APR_BUCKET_IS_EOS(e) && next->r) { /* This is only safe because HTTP_HEADER filter is always in * the filter stack. This ensures that there is ALWAYS a * request-based filter that we can attach this to. If the |