summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorYann Ylavic <ylavic@apache.org>2018-09-07 00:48:28 +0200
committerYann Ylavic <ylavic@apache.org>2018-09-07 00:48:28 +0200
commit5ab81a73c1c320eb81fd4ab81f8cd41b19222b52 (patch)
tree4f0a6728fb33300aaf6e64a82898180af3f63b7a /include
parentfix StrictHostCheck in single/non-NVH vhosts (diff)
downloadapache2-5ab81a73c1c320eb81fd4ab81f8cd41b19222b52.tar.xz
apache2-5ab81a73c1c320eb81fd4ab81f8cd41b19222b52.zip
Follow up to r1840149: core input filter pending data.
Since r1840149 ap_core_input_filter() can't use use f->[priv->]bb directly, so ap_filter_input_pending() stopped accounting for its pending data. But ap_core_input_filter() can't (and doesn't need to) setaside its socket bucket, so ap_filter_setaside_brigade() is not an option. This commit adds ap_filter_adopt_brigade() which simply moves the given buckets (brigade) into f->priv->bb, and since this is not something to be done blindly (the buckets need to have c->pool/bucket_alloc lifetime, which is the case in the core filter) the function is not AP_DECLAREd/exported thus can be used in core only. With ap_filter_adopt_brigade() and ap_filter_reinstate_brigade(), the core input is now ap_filter_input_pending() friendly. Also, ap_filter_recycle() is no more part of the API (AP_DECLARE removed too), there really is no point to call it outside core code. MAJOR bumped once again because of this. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1840265 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'include')
-rw-r--r--include/ap_mmn.h3
-rw-r--r--include/util_filter.h17
2 files changed, 17 insertions, 3 deletions
diff --git a/include/ap_mmn.h b/include/ap_mmn.h
index 6fd05bfb0f..090211d9a7 100644
--- a/include/ap_mmn.h
+++ b/include/ap_mmn.h
@@ -606,12 +606,13 @@
* ap_acquire_brigade()/ap_release_brigade(), and
* in ap_filter_t replace pending/bb/deferred_pool
* fields by struct ap_filter_private *priv
+ * 20180906.1 (2.5.1-dev) Don't export ap_filter_recycle() anymore
*/
#define MODULE_MAGIC_COOKIE 0x41503235UL /* "AP25" */
#ifndef MODULE_MAGIC_NUMBER_MAJOR
-#define MODULE_MAGIC_NUMBER_MAJOR 20180905
+#define MODULE_MAGIC_NUMBER_MAJOR 20180906
#endif
#define MODULE_MAGIC_NUMBER_MINOR 1 /* 0...n */
diff --git a/include/util_filter.h b/include/util_filter.h
index 135ff35f42..064d0cee35 100644
--- a/include/util_filter.h
+++ b/include/util_filter.h
@@ -596,6 +596,16 @@ AP_DECLARE(int) ap_filter_prepare_brigade(ap_filter_t *f);
AP_DECLARE(apr_status_t) ap_filter_setaside_brigade(ap_filter_t *f,
apr_bucket_brigade *bb);
+/*
+ * Adopt a bucket brigade as is (no setaside nor copy).
+ * @param f The current filter
+ * @param bb The bucket brigade adopted. This brigade is always empty
+ * on return
+ * @remark httpd internal, not exported, needed by
+ * ap_core_input_filter
+ */
+void ap_filter_adopt_brigade(ap_filter_t *f, apr_bucket_brigade *bb);
+
/**
* Reinstate a brigade setaside earlier, and calculate the amount of data we
* should write based on the presence of flush buckets, size limits on in
@@ -656,14 +666,17 @@ AP_DECLARE_NONSTD(int) ap_filter_output_pending(conn_rec *c);
*/
AP_DECLARE_NONSTD(int) ap_filter_input_pending(conn_rec *c);
-/**
+/*
* Recycle removed request filters so that they can be reused for filters
* added later on the same connection. This typically should happen after
* each request handling.
*
* @param c The connection.
+ * @remark httpd internal, not exported, needed by
+ * ap_process_request_after_handler
+ *
*/
-AP_DECLARE(void) ap_filter_recycle(conn_rec *c);
+void ap_filter_recycle(conn_rec *c);
/**
* Flush function for apr_brigade_* calls. This calls ap_pass_brigade