Hello,
I took the tags parsing code from mod_headers to incorporate it to
mod_substitute.
It almost works, but I cannot obtain the handlers via apr_hash_get() -
even the locally defined ones (%D & %t).
They are all registered:
static int tags_pre_config(apr_pool_t *p, apr_pool_t *plog,
apr_pool_t *ptemp)
{
format_tag_hash = apr_hash_make(p);
register_format_tag_handler("D", (const void
*)tags_request_duration);
register_format_tag_handler("t", (const void *)tags_request_time);
register_format_tag_handler("e", (const void
*)tags_request_env_var);
register_format_tag_handler("s", (const void
*)tags_request_ssl_var);
return OK;
}
Any idea what could be the problem?
Btw, I copied the code from mod_headers and it is 98% identical, so I'll
modularise it to be 100% portable between these 2 modules (and others).
The next step will be to remove it from the modules itself and make the
static functions global.
Thanks,
Nick