https://bz.apache.org/bugzilla/show_bug.cgi?id=66243
Bug ID: 66243
Summary: Nested #include not detected / path not taken
Product: Apache httpd-2
Version: 2.5-HEAD
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P2
Component: mod_include
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
In mod_include.c::includes_filter() the code intended to detect nested
#includes does not trigger. I discovered this whilst adding two environment
variables (SSI_INCLUDE_LEVEL and SSI_INCLUDE_COUNT) - the sub-requests for the
nested #include statements get a new request_rec so the following code never
triggers:
if ((parent = ap_get_module_config(r->request_config, &include_module))) {
/* Kludge --- for nested includes, we want to keep the subprocess
* environment of the base document (for compatibility); that means
* torquing our own last_modified date as well so that the
* LAST_MODIFIED variable gets reset to the proper value if the
* nested document resets <!--#config timefmt -->.
*/
r->subprocess_env = r->main->subprocess_env;
apr_pool_join(r->main->pool, r->pool);
r->finfo.mtime = r->main->finfo.mtime;
}
I added copious debug messages to trace the paths taken and the above code is
never executed.
I've tried several other methods to detect nesting but the only way it
(sometimes) works is by using static variables - but that falls over if another
thread handles sub-requests or the next full request.
It definitely won't work by storing info in include_ctx_t nor ssi_internal_ctx.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]