httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jason S. Priebe" <>
Subject ANNOUNCE: mod_trailer
Date Wed, 04 Mar 1998 17:26:56 GMT

Greetings!  I'm a new member of the list; I've primarily joined to
get some feedback on a module I've writte, and hopefully to contribute
it to the module registry.

As a fairly recent Netscape-to-Apache convert, one of the hurdles I 
faced was being able to add "trailers" to all documents site-wide. 
We had grown dependent on this feature of the Netscape server to allow
us to add a copyright and 'last modified at' message to every document
on the site.

So before moving to Apache, I whipped up this module.  We've been using
it with no problems for about 5 months on a server that receives up to 4 
million hits weekly.

The only drawback to the module is that it requires a change to the Apache
core.  In order for the server to send the correct Content-Length value to
the client, it must add the length of the trailer to the length of the
document served.  As far as I could tell, the Apache core would not let me
do this, so I modified set_content_length() in http_protocol.c.  The change
is simple, although it really is a hack.  If somebody knows of a better
way to do this, please let me know.  I changed a line reading

  r->clength = clength


  r->clength += clength

(and then subsequent uses of the variable clength were changed to use
r->clength).  mod_trailer calls set_content_length() with the computed
length of the trailer, passes off the request to the normal handler,
and when that handler returns, prints out the trailer.

I'd love to add this module to the module registry, and would be happy to
maintain it.  For the source and documentation, please see

Thanks, and I look forward to hearing from interested parties!

- --------------------------------------------------
Jason Priebe                           WRAL OnLine                     Raleigh, NC
see for public key                

Version: 2.6.2


View raw message