Changes with Apache 2.0.44
+ *) Fix a bug where we keep files open until the end of a
+ keepalive connection, which can result in:
+ (24)Too many open files: file permissions deny server access
+ especially on threaded servers. [Greg Ames, Jeff Trawick]
+
*) Fix a bug in which mod_proxy sent an invalid Content-Length
when a proxied URL was invoked as a server-side include within
a page generated in response to a form POST. [Brian Pane]
typedef struct core_output_filter_ctx {
apr_bucket_brigade *b;
- apr_pool_t *subpool; /* subpool of c->pool used for data saved after a
- * request is finished
- */
- int subpool_has_stuff; /* anything in the subpool? */
+ apr_pool_t *deferred_write_pool; /* subpool of c->pool used for resources
+ * which may outlive the request
+ */
} core_output_filter_ctx_t;
typedef struct core_filter_ctx {
}
}
}
- ap_save_brigade(f, &ctx->b, &b, c->pool);
+ if (!ctx->deferred_write_pool) {
+ apr_pool_create(&ctx->deferred_write_pool, c->pool);
+ }
+ ap_save_brigade(f, &ctx->b, &b, ctx->deferred_write_pool);
return APR_SUCCESS;
}
}
apr_brigade_destroy(b);
+
+ /* drive cleanups for resources which were set aside
+ * this may occur before or after termination of the request which
+ * created the resource
+ */
+ if (ctx->deferred_write_pool) {
+ apr_pool_clear(ctx->deferred_write_pool);
+ }
if (rv != APR_SUCCESS) {
ap_log_error(APLOG_MARK, APLOG_INFO, rv, c->base_server,
"core_output_filter: writing data to the network");