[Catalyst] Re: Catalyst, Firefox and SVG

Maurice Height mauriceh at bigpond.net.au
Sat Dec 10 04:41:49 CET 2005


Andy Grundman wrote:

> Firefox is a stickler for MIME types, and the latest version of 
> MIME::Types does not include one for svg.  You will have to set the type 
> manually:

> MyApp->config->{static}->{mime_types} = { svg => 'image/svg+xml' };
> 
> Oh and I should say, that even though you have the type specified in your 
> html file, Static::Simple serves unknown types as text/plain, which is 
> most likely where the problem comes from.

I think you nailed it, because I tried this in my test app:

__PACKAGE__->config( name   => 'CatApp',
                     root   => CatApp->path_to('root'),
                     static => { mime_types => { svg => 'image/svg+xml' } },
);

but it did not stop FireFox from displaying the SVG content as text
(Internet Explorer is OK).  
At this stage I do not have a clue how to fix this.
While I can use IE as a workaround for now, is this problem something that
can be fixed in Catalyst or MIME::Types?

Thanks
Maurice





More information about the Catalyst mailing list