[Catalyst] correct way to call CSS files?
Andy Grundman
andy at hybridized.org
Thu Apr 21 23:36:30 CEST 2005
Alan Humphrey wrote:
> [Thu Apr 21 14:14:22 2005] [catalyst] [debug] Serving file
> "/home/alanh/birdweb/trunk/BirdWeb-Admin/root/css/birdweb.css" as
> "text/plain"
The Static plugin uses the File::MimeInfo::Magic module to work out what
to serve each file as. I guess it doesn't support css files. You can
work around this with the following code:
if ($c->req->path =~ /css$/i) {
$c->serve_static( "text/css" );
} else {
$c->serve_static;
}
Will look and see if this can be fixed in the plugin or Mime module.
-Andy
More information about the Catalyst
mailing list