httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From minf...@apache.org
Subject svn commit: r1706670 - /httpd/httpd/trunk/server/core_filters.c
Date Sun, 04 Oct 2015 10:41:27 GMT
Author: minfrin
Date: Sun Oct  4 10:41:27 2015
New Revision: 1706670

URL: http://svn.apache.org/viewvc?rev=1706670&view=rev
Log:
Remain compatible with legacy MPMs that passed NULL to the network filter

Modified:
    httpd/httpd/trunk/server/core_filters.c

Modified: httpd/httpd/trunk/server/core_filters.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/core_filters.c?rev=1706670&r1=1706669&r2=1706670&view=diff
==============================================================================
--- httpd/httpd/trunk/server/core_filters.c (original)
+++ httpd/httpd/trunk/server/core_filters.c Sun Oct  4 10:41:27 2015
@@ -79,6 +79,7 @@ do { \
 
 struct core_output_filter_ctx {
     apr_bucket_brigade *tmp_flush_bb;
+    apr_bucket_brigade *empty_bb;
     apr_size_t bytes_written;
 };
 
@@ -382,6 +383,14 @@ apr_status_t ap_core_output_filter(ap_fi
         ctx->tmp_flush_bb = apr_brigade_create(c->pool, c->bucket_alloc);
     }
 
+    /* remain compatible with legacy MPMs that passed NULL to this filter */
+    if (bb == NULL) {
+        if (ctx->empty_bb == NULL) {
+            ctx->empty_bb = apr_brigade_create(c->pool, c->bucket_alloc);
+        }
+        bb = ctx->empty_bb;
+    }
+
     /* Scan through the brigade and decide whether to attempt a write,
      * and how much to write, based on the following rules:
      *



Mime
View raw message