Coalesce when (subsequent brigade's) data bucket is not last (likely followed
by FLUSH or EOS) but we have buffered data already.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@
1723143 13f79535-47bb-0310-9956-
ffa450edef68
/* Coalesce the prefix, if:
* a) more than one bucket is found to coalesce, or
* b) the brigade contains only a single data bucket, or
- * c)
+ * c) the data bucket is not last but we have buffered data already.
*/
if (bytes > 0
&& (count > 1
- || (count == 1 && endb == APR_BRIGADE_SENTINEL(bb)))) {
+ || (endb == APR_BRIGADE_SENTINEL(bb))
+ || (ctx && ctx->bytes > 0))) {
/* If coalescing some bytes, ensure a context has been
* created. */
if (!ctx) {