httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Jagielski <>
Subject sed filter module
Date Tue, 13 Mar 2007 13:24:25 GMT
There have been times when having a simple sed filter in Apache
would be useful... I used to use just ext_filter to do this,
but this got more and more painful the more I used it. So awhile
ago I made mod_sed_filter which I find pretty useful. I've just
built and tested in with 2.2 and trunk...

Anyone mind if I fold it into trunk and maybe have us
consider making it part of 2.2 (even under experimental)?

No docs yet but the code is:

and the usage is easy:

	AddOutputFilterByType SEDFILTER text/html
	Sed s/foo/bar/in
	Sed s#monkey(hat)#chimp-$1#i
	Sed "s/works/functions/in"

note that it uses sed line controls, flexible
delims and support regex and simple pattern match (the 'n'
flag... no real sed option there ;) )

View raw message