]> granicus.if.org Git - apache/commitdiff
Ensure that output already available is flushed to the network
authorJeff Trawick <trawick@apache.org>
Wed, 2 Oct 2002 13:41:45 +0000 (13:41 +0000)
committerJeff Trawick <trawick@apache.org>
Wed, 2 Oct 2002 13:41:45 +0000 (13:41 +0000)
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
server/protocol.c

diff --git a/CHANGES b/CHANGES
index 2c79799173f99b3d8718a6f1588014dd8e361006..2dc754500e0f2dcb44045ba4c93a12a6a25455b7 100644 (file)
--- 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]
index 63deb88b6fb740d76af7e0bb109a74135266f85f..34c268b4b56946cad95634816ace8d8befd6e83c 100644 (file)
@@ -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);