From: Greg Ames Date: Mon, 1 Oct 2001 21:01:14 +0000 (+0000) Subject: ap_sub_req_output_filter: don't pass along a brigade if it becomes empty X-Git-Tag: 2.0.26~131 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a119c5284624fb4f6d01c48f1447460d4286ffcf;p=thirdparty%2Fapache%2Fhttpd.git ap_sub_req_output_filter: don't pass along a brigade if it becomes empty after deleting the EOS bucket. This prevents a seg fault in mod_include when the connection dies. There doesn't seem to be much point in passing empty brigades in general. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91225 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/server/request.c b/server/request.c index d2efdfce271..11f6f409dea 100644 --- a/server/request.c +++ b/server/request.c @@ -1520,7 +1520,12 @@ AP_CORE_DECLARE_NONSTD(apr_status_t) ap_sub_req_output_filter(ap_filter_t *f, if (APR_BUCKET_IS_EOS(e)) { apr_bucket_delete(e); } - return ap_pass_brigade(f->next, bb); + if (!APR_BRIGADE_EMPTY(bb)) { + return ap_pass_brigade(f->next, bb); + } + else { + return APR_SUCCESS; + } }