Check the file mime type and display text/* - annna - Annna the nice friendly bot. (HTM) git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/annna/ (DIR) Log (DIR) Files (DIR) Refs (DIR) Tags (DIR) README --- (DIR) commit 2d4b83b4b7c822992aa5dd2d18c7f672d963c68e (DIR) parent 58865cceb90c5d440e54de4454b99aa740ae1419 (HTM) Author: Annna Robert-Houdin <annna@bitreich.org> Date: Fri, 5 Jun 2020 22:11:15 +0200 Check the file mime type and display text/* Diffstat: M annna-start-services | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) --- (DIR) diff --git a/annna-start-services b/annna-start-services @@ -118,8 +118,13 @@ annna_common() { nuri="${nuri}; gopherdit: ${guri} " fi ;; - *.html|*.HTML|*.txt|*.TXT|*/) - nocuri=0 + *) + mimetype="$(file -b --mime-type "${tmpf}")" + case "${mimetype}" in + text/*) + nocuri=0 + ;; + esac ;; esac