From e8402764faa501b8d9b4bcd7553d89c58ea34cd8 Mon Sep 17 00:00:00 2001 From: Jeff Trawick Date: Wed, 2 Oct 2002 13:41:45 +0000 Subject: [PATCH] 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 --- CHANGES | 5 +++++ server/protocol.c | 3 +++ 2 files changed, 8 insertions(+) diff --git a/CHANGES b/CHANGES index 2c79799173f..2dc754500e0 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 63deb88b6fb..34c268b4b56 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); -- 2.47.2