httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jason S. Priebe" <pri...@wral-tv.com>
Subject ANNOUNCE: mod_trailer
Date Wed, 04 Mar 1998 17:26:56 GMT
-----BEGIN PGP SIGNED MESSAGE-----

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

  to 

  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

http://www2.wral-tv.com/~priebe/webUtils/mod_trailer.tgz

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

- --------------------------------------------------
Jason Priebe                           WRAL OnLine
priebe@wral-tv.com                     Raleigh, NC
see http://www.wral-tv.com/~priebe/ for public key                


-----BEGIN PGP SIGNATURE-----
Version: 2.6.2

iQCVAwUBNP2O4+qkj/9w/z2hAQGjmQP/eSiVHKyflxB3YfHQB1fzM8tVVTXKjmRe
5Skmb254+3+xu9wFvh0ZieNGtjcJx3/gpPSCum1gTZZaRpCjFh/wx9D36yA0BbkO
h7o0oPNpmxKyQ+jxq/jscPqPP33rn03kGBoPoP6uYjHIXk5rM5Qo3zpxFoqqaH3Y
LrfWgfkKM18=
=9KMM
-----END PGP SIGNATURE-----


Mime
View raw message