Michele Gherlone wrote:
Hi all!
I was trying to bypass mod_mime for certain mime type, and I wrote this
small handler:
--------------------------------
package Apache::MIMEMagic;
$Apache::MIMEMagic::VERSION='0.10';
use Apache2::Const -compile => qw(OK DECLINED);
use File::MMagic;
use strict; sub handler { my $r = shift;
my $ct=File::MMagic->new->checktype_filename($r->filename);
$r->handler('default-handler'); $r->content_type($ct);
return Apache2::Const::OK;
}
1;
---------------------------------
Since I was running it for a dir under my docroot, i had to set Apache's
default-handler. All went fine, docs were correctly served, but in my
logs for every served document, this error line appeared:
`Invalid type 'the' at line 1`.
What's the value of $ct?
I really wish I could know where this error comes from. Perhaps from
mod_mime itself, or...?
grep the apache sources for 'Invalid type' string?
--
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com