core: always allocate filters (ap_filter_t) on f->c->pool.
When filters are allocated on f->r->pool, they may be destroyed any time underneath themselves which makes it hard for them to be passed the EOR and forward it (*f can't be dereferenced anymore when the EOR is destroyed, thus before request filters return). On the util_filter side, it also makes it impossible to flush pending request filters when they have set aside the EOR, since f->bb can't be accessed after it's passed to the f->next. So we always use f->c->pool to allocate filters and pending brigades, and to avoid leaks with keepalive requests (long living connections handling multiple requests), filters and brigades are recycled with a cleanup on f->r->pool. Recycling is done (generically) with a spare data ring (void pointers), and a filter(s) context struct is associated with the conn_rec to maintain the rings by connection, that is: struct ap_filter_conn_ctx { struct ap_filter_ring *pending_input_filters; struct ap_filter_ring *pending_output_filters; struct ap_filter_spare_ring *spare_containers, *spare_brigades, *spare_filters, *spare_flushes; int flushing; }; MMN major bumped (again). git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1839997 13f79535-47bb-0310-9956-ffa450edef68
parent
c1b278a3
Please register or sign in to comment