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
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