swhitty/FlyingFox

ContentType for CSS Files

FahimF opened this issue · 2 comments

If I try to use FlyingFox and embed some HTML with CSS in my app and then load the content via a WebKit browser instance, the HTML content does not load correctly because the CSS does not get loaded.

It appears that the makeContentType method in FileHTTPHandler does not return the right type for CSS files. If you add the following case to the method, the HTML content renders correctly:

case "css":
	return "text/css"

Thanks for the issue @FahimF 🙏🏻.

Fix is on the main branch.

Thank you for the fix 🙂 Funny thing is I checked like an hour ago to see if the fix was in since I'm using your library on two separate projects and I had the source code in till a fix was in place. So, much appreciated!