httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Fritsch ...@sfritsch.de>
Subject Re: mod_substitute tags parsing
Date Sun, 07 Nov 2010 12:57:47 GMT
Sorry, I was not clear enough.

mod_log_config provides CustomLog/LogFormat and should work very similar 
to what mod_headers does. It should be relatively easy to make them use 
the same code.

ErrorLog/ErrorLogFormat is provided by the core and works differently (due 
to lack of request_rec, etc.). Don't try to accomodate that as well, this 
would make the code rather complicated.

On Sun, 7 Nov 2010, Nick Gearls wrote:

> If somebody from mod_log_config wants to discuss with me to generalise the 
> code to be usable also without request_rec/server_req and pools, I can try to 
> do it cleanly for the first patch proposal.
>
> Any idea why I cannot obtain the handlers via apr_hash_get()?
> Or maybe what I could check to debug the problem (I do not know how this 
> register_format_tag_handler() works.
>
> Nick
>
>
> -------- Original Message --------
> Subject: Re: mod_substitute tags parsing
> Date: Sat, 6 Nov 2010 21:51:26 +0100 (CET)
> From: Stefan Fritsch <sf@sfritsch.de>
> To: Development Apache <dev@httpd.apache.org>, nickgearls@gmail.com
>
> On Sat, 6 Nov 2010, Nick Gearls wrote:
>> 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.
>
> This looks very similar to the code in mod_log_config. Maybe it could be
> made general enough that all three modules could use the same code?
>
> OTOH, the ErrorLog formatter can probably not use the same code. It has to
> work without request_rec or server_req and should not use pools for memory
> allocation.
>
> BTW, I have also thought about making it possible to evaluate an ap_expr
> to a string. Then one could use a string like "%{ENV:xxx} %{IPV6}".
> Would this be a useful alternative?
>
>

Mime
View raw message