Actually, the problem is that apr_table_get(r->subprocess_env, a) always
returns null.
I suppose that the problem lies in the request variable "r".
I am using f->r where f is the "ap_filter_t" given as parameter to
do_pattmatch().
Should I use another one,
Thanks,
Nick
-------- Original Message --------
Subject: mod_substitute tags parsing
Date: Sat, 06 Nov 2010 18:19:33 +0100
From: Nick Gearls <[email protected]>
Reply-To: [email protected]
To: Development Apache <[email protected]>
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