From: Jeff Trawick Date: Wed, 2 Oct 2002 13:41:45 +0000 (+0000) Subject: Ensure that output already available is flushed to the network X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=eaa024950d38531437628ec6770c4928dd70172b;p=apache Ensure that output already available is flushed to the network when the content-length filter realizes that no new output will be available for a while. This helps some streaming CGIs as well as some other dynamically-generated content. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97054 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index 2c79799173..2dc754500e 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,10 @@ Changes with Apache 2.0.43 + *) Ensure that output already available is flushed to the network + when the content-length filter realizes that no new output will + be available for a while. This helps some streaming CGIs as + well as some other dynamically-generated content. [Jeff Trawick] + *) Fix a mutex problem in mod_ssl session cache support which could lead to an infinite loop. PR 12705 [amund.elstad@ergo.no (Amund Elstad), Jeff Trawick] diff --git a/server/protocol.c b/server/protocol.c index 63deb88b6f..34c268b4b5 100644 --- a/server/protocol.c +++ b/server/protocol.c @@ -1256,6 +1256,9 @@ AP_CORE_DECLARE_NONSTD(apr_status_t) ap_content_length_filter( */ if (e != APR_BRIGADE_FIRST(b)) { apr_bucket_brigade *split = apr_brigade_split(b, e); + apr_bucket *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) { apr_brigade_destroy(split);