Closed vgamula closed 5 years ago
Okay, so there 2 approaches here:
jMimeMagic
the correct mime typeI'm okay with any of those. Do you want to provide a fix?
@kachayev, sure, I'm going to replace it with org.apache.tika
(tika-core
only) as it seems to be the best tool for detecting MIME types. There is a wrapper on Clojure but I don't think we really need it.
Thanks! I also had to update log deps, looks like log4j
was used transitively before. Will do a new release shortly.
In HTML5 documents doctype does not refer to any DTDs, usually specified like this:
Seems like the tibrary, that is used for detecting MIME types, does not deal properly with such definitions, they are parsed as
text/sgml
https://github.com/arimus/jmimemagic/issues/27.Example:
So, it is not an issue with Nasus itself. Server just sends wrong
Content-Type
and browsers cannot render it properly, as they expect HTML pages to be withContent-Type: text/html
.