httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nick Kew <>
Subject Re: server side includes
Date Mon, 09 Apr 2007 21:25:56 GMT
On Mon, 09 Apr 2007 23:31:32 +0300
Issac Goldstand <> wrote:

> You'd probably just use output filters to parse the output stream and
> add content according to what you find...  I don't have a C example,
> but do have a Perl example (string parsing is just soooo much more
> trivial with Perl than C) at
> (search for "### Output filters").  One replaces a "custom" tag, and
> one simply includes HTML at the beginning of <head>

You can't just do that in any language unless you make a BIG performance
sacrifice.  The basic problem is that "<head>", or any other pattern of
more than one byte, might be split over more than one call to your
filter function.  Techniques for dealing with that are of course
described in my book.

> Sam Carleton wrote:
> > As I sit here on hold, I started thinking about my little apache
> > module again.  I recall reading in "Writing Apache Modules in Perl
> > and C" how with Perl it is quick and easy to create a server side

That book is very, very old.  Apache 1.x didn't have filters, so
SSI was altogether more primitive.

> > include handler, I think that is what it was called.  How would one
> > go about doing that in a C module?  Are there any examples?

... and I don't know what it refers to as an SSI handler (I expect
a primitive mod_include alternative).

Nick Kew

Application Development with Apache - the Apache Modules Book

View raw message