Index: server/protocol.c =================================================================== --- server/protocol.c (revision 1808035) +++ server/protocol.c (working copy) @@ -1684,7 +1684,6 @@ * least one bucket on to the next output filter * for this request */ - apr_bucket_brigade *tmpbb; }; /* This filter computes the content length, but it also computes the number @@ -1699,13 +1698,11 @@ struct content_length_ctx *ctx; apr_bucket *e; int eos = 0; - apr_read_type_e eblock = APR_NONBLOCK_READ; ctx = f->ctx; if (!ctx) { f->ctx = ctx = apr_palloc(r->pool, sizeof(*ctx)); ctx->data_sent = 0; - ctx->tmpbb = apr_brigade_create(r->pool, r->connection->bucket_alloc); } /* Loop through this set of buckets to compute their length @@ -1717,48 +1714,7 @@ break; } if (e->length == (apr_size_t)-1) { - apr_size_t len; - const char *ignored; - apr_status_t rv; - - /* This is probably a pipe bucket. Send everything - * prior to this, and then read the data for this bucket. - */ - rv = apr_bucket_read(e, &ignored, &len, eblock); - if (rv == APR_SUCCESS) { - /* Attempt a nonblocking read next time through */ - eblock = APR_NONBLOCK_READ; - r->bytes_sent += len; - } - else if (APR_STATUS_IS_EAGAIN(rv)) { - /* Output everything prior to this bucket, and then - * do a blocking read on the next batch. - */ - if (e != APR_BRIGADE_FIRST(b)) { - apr_bucket *flush; - apr_brigade_split_ex(b, e, ctx->tmpbb); - flush = apr_bucket_flush_create(r->connection->bucket_alloc); - - APR_BRIGADE_INSERT_TAIL(b, flush); - rv = ap_pass_brigade(f->next, b); - if (rv != APR_SUCCESS || f->c->aborted) { - return rv; - } - apr_brigade_cleanup(b); - APR_BRIGADE_CONCAT(b, ctx->tmpbb); - e = APR_BRIGADE_FIRST(b); - - ctx->data_sent = 1; - } - eblock = APR_BLOCK_READ; - continue; - } - else { - ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(00574) - "ap_content_length_filter: " - "apr_bucket_read() failed"); - return rv; - } + break; } else { r->bytes_sent += e->length;