Answer the question
In order to leave comments, you need to log in
Tornado. Why wrong MIME when returning static?
Good afternoon. I have a small tornado project that only communicates with the client side using web sockets. Those. absolutely all project files downloaded by the user are static. For distribution I used tornado.web.StaticFileHandler.
And everything would be fine, but only in the project there are several fonts (ttf), which tornado stubbornly renders in the form of an html page (it even substitutes tags). Because of this, browsers refuse to download the font when loading the page. it is marked as text/html.
Using the option with an external server / cdn will not work, because. there is a possibility that the client will not have access to the Internet.
In general, the question itself is: how to make tornado return the correct MIME? Or, all the same, you should not even try and use the second http server (very undesirable, because all this canoe works on raspberry and resources are worth their weight in gold).
Thanks in advance for your replies.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question