Changes with Apache 2.1.0-dev
+
+ [Remove entries to the current 2.0 section below, when backported]
+
+ *) Fix a bug where we leak fd's until the end of a keepalive
+ connection, which may result in:
+ (24)Too many open files: file permissions deny server access
+ especially on threaded servers. [Greg Ames]
+
*) If an httpd.conf has commented out AddModule directives,
apxs -i -a will add an un-commented AddModule directive for
the new module, which breaks the config.
PR: 11212 [Joe Orton]
- [Remove entries to the current 2.0 section below, when backported]
-
*) Fix mod_proxy handling of filtered input bodies. [Justin Erenkrantz]
*) Don't remove the Content-Length from responses in mod_proxy
once per worker, indicating that the CacheRoot needs to be set.
[Paul J. Reder]
- *) 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]
core_net_rec *net = f->ctx;
core_output_filter_ctx_t *ctx = net->out_ctx;
apr_read_type_e eblock = APR_NONBLOCK_READ;
+ apr_pool_t *input_pool = b->p;
if (ctx == NULL) {
ctx = apr_pcalloc(c->pool, sizeof(*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) {
+ if (more && more->p == ctx->deferred_write_pool) {
+ /* "more" belongs to the deferred_write_pool,
+ * which is about to be cleared.
+ */
+ if (APR_BRIGADE_EMPTY(more)) {
+ more = NULL;
+ }
+ else {
+ /* uh oh... change more's lifetime
+ * to the input brigade's lifetime
+ */
+ apr_bucket_brigade *tmp_more = more;
+ more = NULL;
+ ap_save_brigade(f, &more, &tmp_more, input_pool);
+ }
+ }
+ apr_pool_clear(ctx->deferred_write_pool);
+ }
if (rv != APR_SUCCESS) {
ap_log_error(APLOG_MARK, APLOG_INFO, rv, c->base_server,