summaryrefslogtreecommitdiffstats
path: root/include/httpd.h
diff options
context:
space:
mode:
authorYann Ylavic <ylavic@apache.org>2018-09-05 19:27:43 +0200
committerYann Ylavic <ylavic@apache.org>2018-09-05 19:27:43 +0200
commite70b8bfbcd790e99dca06b08066f1f25c5e85d1d (patch)
tree15830393e0cb8657c4cd4aa886d91341c9c9281d /include/httpd.h
parentcore: follow up to r1839997: some runtime optimizations. (diff)
downloadapache2-e70b8bfbcd790e99dca06b08066f1f25c5e85d1d.tar.xz
apache2-e70b8bfbcd790e99dca06b08066f1f25c5e85d1d.zip
util_filter: protect ap_filter_t private fields from external (ab)use.
Introduce opaque struct ap_filter_private to move ap_filter_t "pending", "bb" and "deferred_pool" fields to the "priv" side of things. This allows to trust values set internally (only!) in util_filter code, and make useful assertions between the different functions calls, along with the usual nice extensibility property. Likewise, the private struct ap_filter_conn_ctx in conn_rec (from r1839997) allows now to implement the new ap_acquire_brigade() and ap_release_brigade() functions useful to get a brigade with c->pool's lifetime. They obsolete ap_reuse_brigade_from_pool() which is replaced where previously used. Some comments added in ap_request_core_filter() regarding the lifetime of the data it plays with, up to EOR... MAJOR bumped (once again). git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1840149 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'include/httpd.h')
-rw-r--r--include/httpd.h17
1 files changed, 2 insertions, 15 deletions
diff --git a/include/httpd.h b/include/httpd.h
index 977c042897..1f6a608200 100644
--- a/include/httpd.h
+++ b/include/httpd.h
@@ -1111,7 +1111,7 @@ typedef enum {
AP_CONN_KEEPALIVE
} ap_conn_keepalive_e;
-/* For struct ap_filter_conn_ctx */
+/* For struct ap_filter and ap_filter_conn_ctx */
#include "util_filter.h"
/**
@@ -1224,7 +1224,7 @@ struct conn_rec {
/** Array of requests being handled under this connection. */
apr_array_header_t *requests;
- /** Filters' context for this connection */
+ /** Filters private/opaque context for this connection */
struct ap_filter_conn_ctx *filter_conn_ctx;
/** The minimum level of filter type to allow setaside buckets */
@@ -2194,19 +2194,6 @@ AP_DECLARE(int) ap_request_has_body(request_rec *r);
AP_DECLARE(int) ap_request_tainted(request_rec *r, int flags);
/**
- * Reuse a brigade from a pool, or create it on the given pool/alloc and
- * associate it with the given key for further reuse.
- *
- * @param key the key/id of the brigade
- * @param pool the pool to cache and create the brigade from
- * @param alloc the bucket allocator to be used by the brigade
- * @return the reused and cleaned up brigade, or a new one
- */
-AP_DECLARE(apr_bucket_brigade *) ap_reuse_brigade_from_pool(const char *key,
- apr_pool_t *pool,
- apr_bucket_alloc_t *alloc);
-
-/**
* Cleanup a string (mainly to be filesystem safe)
* We only allow '_' and alphanumeric chars. Non-printable
* map to 'x' and all others map to '_'