> I can try to guess the content-type from the filename (which is what > I'm doing now), but I'd prefer not to re-implement Apache's system for > deciding content types, and I'd also like it to Do The Right Thing for > CGI/mod_perl scripts, where you can't tell by the filename what > content-type they're going to output.
in addition to what philippe said, Apache::Clean for mp2 should prove as a good example for you to follow: http://search.cpan.org/~geoff/Apache-Clean-2.00_4/ see also the two articles on perl.com that talk about this particular module: http://www.perl.com/pub/a/2003/04/17/filters.html http://www.perl.com/pub/a/2003/05/22/testing.html HTH --Geoff