Changes with Apache 2.0.29-dev
+ *) Fix a file descriptor leak in mod_include. When we include a
+ file, we use a sub-request, but we didn't destroy the sub-request
+ immediately, instead we waited until the original request was
+ done. This patch closes the sub-request as soon as the data is
+ done being generated. [Brian Pane <bpane@pacbell.net>]
+
*) Allow modules that add sockets to the ap_listeners list to
define the function that should be used to accept on that
socket. Each MPM can define their own function to use for
*inserted_head);
}
- /* destroy the sub request if it's not a nested include
- * (crumb) */
- if (rr != NULL
- && ap_get_module_config(rr->request_config,
- &include_module) != NESTED_INCLUDE_MAGIC) {
+ /* destroy the sub request */
+ if (rr != NULL) {
ap_destroy_sub_req(rr);
}
}
request_rec *r = f->r;
include_ctx_t *ctx = f->ctx;
request_rec *parent;
- apr_status_t rv;
include_dir_config *conf =
(include_dir_config *)ap_get_module_config(r->per_dir_config,
&include_module);
apr_table_unset(f->r->headers_out, "ETag");
apr_table_unset(f->r->headers_out, "Last-Modified");
- rv = send_parsed_content(&b, r, f);
-
- if (parent) {
- /* signify that the sub request should not be killed */
- ap_set_module_config(r->request_config, &include_module,
- NESTED_INCLUDE_MAGIC);
- }
-
- return rv;
+ return send_parsed_content(&b, r, f);
}
static void ap_register_include_handler(char *tag, include_handler_fn_t *func)
#define RAW_ASCII_CHAR(ch) (ch)
#endif /*APR_CHARSET_EBCDIC*/
-/* just need some arbitrary non-NULL pointer which can't also be a request_rec */
-#define NESTED_INCLUDE_MAGIC (&include_module)
-
/****************************************************************************
* Used to keep context information during parsing of a request for SSI tags.
* This is especially useful if the tag stretches across multiple buckets or