Lagrange crashes/locks-up for binary files incorrectly sent as "text/gemini` #601
Open
Description
There are files in Geminispace incorrectly served with a text/gemini
MIME type that are really binaries. Lagrange crashes, locks up, or becomes very slow when loading these URLs, depending on the version/platform (I've seen all 3 happen).
Here is a 14 MB Linux ELF executable, sent with an incorrect text/gemini
MIME type
gemini://mkl-wlod.srht.site/repo/tree/scripts/.local/bin/gmnigit
As a fix, as mention in #600 you could use the MIME sniffing standards "mislabeled binary resource" rules to detect when text/gemini
(and really any text/*
MIME type) isn't really text, and not attempt to render it.