httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Folini <>
Subject Re: Expression Parser: search and replace with s/PATTERN/REPLACEMENT/FLAGS
Date Thu, 01 Oct 2015 12:18:00 GMT
On Thu, Oct 01, 2015 at 01:55:40PM +0200, Rainer Jung wrote:
> Something different. Example:
> Header set X-USER "expr=%{REMOTE_USER} =~ s/([^@]*)@.*/$1/"
> ...
> The example might be artificial and mod_header might support doing
> this in another way, but IMHO it would be a nice general feature for
> the expression parser which would work without cooperation from the
> modules/directives that use the expression parser.

This would be really neat. We have a few recipes where we abuse
ModSecurity or mod_rewrite to achieve this. Having it available
within the expression parser would simplify things a lot
(and get rid of timing and hook precedence issues).


Christian Folini

Christian Folini - <>

View raw message