From 59cf8bc5ec768cf95371ff983fc68b0e3f4abd57 Mon Sep 17 00:00:00 2001 From: Jose Quintana Date: Fri, 2 Jul 2021 17:19:42 +0200 Subject: [PATCH] refactor: more text-based mime types for compression - text/csv - text/calendar - text/markdown - text/x-yaml - text/x-toml - application/rtf - application/xhtml+xml --- src/compression.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/compression.rs b/src/compression.rs index d224963..140383e 100644 --- a/src/compression.rs +++ b/src/compression.rs @@ -18,13 +18,20 @@ use tokio_util::io::{ReaderStream, StreamReader}; use crate::Result; /// Contains a fixed list of common text-based MIME types in order to apply compression. -pub const TEXT_MIME_TYPES: [&str; 16] = [ +pub const TEXT_MIME_TYPES: [&str; 23] = [ "text/html", "text/css", "text/javascript", "text/xml", "text/plain", + "text/csv", + "text/calendar", + "text/markdown", + "text/x-yaml", + "text/x-toml", "text/x-component", + "application/rtf", + "application/xhtml+xml", "application/javascript", "application/x-javascript", "application/json", -- libgit2 1.7.2