Hello,
[...]
I've got it working right now, but I'd like it to know the Content-Type that Apache would use for a document, so I can decide whether to filter it and so I can send a correct Content-Type header.
$r->content_type should tell you that.
http://perl.apache.org/docs/2.0/api/Apache/RequestRec.html#C_content_type_
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.
Yes, certainly a good idea not to do anything of the sort. Let Apache tell you that.
-------------------------------------------------------------------------------- Philippe M. Chiasson m/gozer\@(apache|cpan|ectoplasm)\.org/ GPG KeyID : 88C3A5A5 http://gozer.ectoplasm.org/ F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3A5A5
signature.asc
Description: OpenPGP digital signature