[webkit-dev] Mimetype for files loaded from disk?
Julien Chaffraix
julien.chaffraix at gmail.com
Mon Mar 17 08:16:04 PDT 2008
Hi,
On 3/17/08, Mike Emmel <mike.emmel at gmail.com> wrote:
>
> In the curl backed some code uses file extensions to set the mime type
> for local files.
> I'm not sure css files are handled.
They are not (see platform/gtk/MIMERegistryGtk.cpp which contains the
association between extension and mime type). I would suggest adding an
entry for css <-> "text/css" after a quick look. Iit seems safe as
MIMERegistry::getMIMETypeForExtension is called only for local file but I
may have missed some issues.
Julien
On Sun, Mar 16, 2008 at 9:22 PM, Kevin Ollivier <kevino at theolliviers.com>
> wrote:
> > Hi all,
> >
> > I've hit an issue with the wx port where HTML files that use @import
> > url("file.css") will not load when the HTML and CSS file are on disk
> > rather than loaded via the web. After tracking it down, I found that I
> > could resolve the issue by having CURL set the file type for
> > m_response to "application/x-unknown-content-type", which enables the
> > CachedCSSStyleSheet::canUseSheet test to pass, but I'm not sure this
> > is the right approach.
> >
> > Another wrinkle to this issue is that this problem doesn't appear on
> > the Windows wx port, only Linux/Mac. I'm fairly certain this
> > discrepancy is not due to wx code, and so I was wondering how other
> > ports (Apple's and otherwise) handle this issue. Is there some
> > alternative approach to setting the mimetype explicitly, or is there
> > some extension <-> mimetype mapping being used in some cases?
> >
> > Thanks,
> >
> > Kevin
> > _______________________________________________
> > webkit-dev mailing list
> > webkit-dev at lists.webkit.org
> > http://lists.webkit.org/mailman/listinfo/webkit-dev
> >
> _______________________________________________
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
> http://lists.webkit.org/mailman/listinfo/webkit-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.webkit.org/pipermail/webkit-dev/attachments/20080317/f292ada1/attachment.html
More information about the webkit-dev
mailing list