[webkit-dev] Mimetype for files loaded from disk?

Kevin Ollivier kevino at theolliviers.com
Sun Mar 16 21:22:08 PDT 2008


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


More information about the webkit-dev mailing list