]> granicus.if.org Git - apache/commit
util_filter: protect ap_filter_t private fields from external (ab)use.
authorYann Ylavic <ylavic@apache.org>
Wed, 5 Sep 2018 17:27:43 +0000 (17:27 +0000)
committerYann Ylavic <ylavic@apache.org>
Wed, 5 Sep 2018 17:27:43 +0000 (17:27 +0000)
commite70b8bfbcd790e99dca06b08066f1f25c5e85d1d
tree15830393e0cb8657c4cd4aa886d91341c9c9281d
parent0093e3ad225e9106e3f128616d7a63876e3db011
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
include/ap_mmn.h
include/httpd.h
include/util_filter.h
modules/http/http_request.c
server/core_filters.c
server/request.c
server/util.c
server/util_filter.c