Registered MIME-types for .ico and .json

As a result, favicon.ico stopped being considered a compressible resource.
This commit is contained in:
Veloman Yunkan 2023-02-09 22:18:36 +01:00
parent f4f7879ff3
commit e8c8a297b5
2 changed files with 6 additions and 4 deletions

View File

@ -493,12 +493,14 @@ static std::map<std::string, std::string> extMimeTypes = {
{ "jpeg", "image/jpeg"},
{ "jpg", "image/jpeg"},
{ "gif", "image/gif"},
{ "ico", "image/x-icon"},
{ "svg", "image/svg+xml"},
{ "txt", "text/plain"},
{ "xml", "text/xml"},
{ "pdf", "application/pdf"},
{ "ogg", "application/ogg"},
{ "js", "application/javascript"},
{ "json", "application/json"},
{ "css", "text/css"},
{ "otf", "application/vnd.ms-opentype"},
{ "ttf", "application/font-ttf"},

View File

@ -58,8 +58,6 @@ const ResourceCollection resources200Compressible{
{ STATIC_CONTENT, "/ROOT%23%3F/skin/autoComplete.min.js?cacheid=1191aaaf" },
{ DYNAMIC_CONTENT, "/ROOT%23%3F/skin/css/autoComplete.css" },
{ STATIC_CONTENT, "/ROOT%23%3F/skin/css/autoComplete.css?cacheid=08951e06" },
{ DYNAMIC_CONTENT, "/ROOT%23%3F/skin/favicon/favicon.ico" },
{ STATIC_CONTENT, "/ROOT%23%3F/skin/favicon/favicon.ico?cacheid=fba03a27" },
{ DYNAMIC_CONTENT, "/ROOT%23%3F/skin/i18n.js" },
{ STATIC_CONTENT, "/ROOT%23%3F/skin/i18n.js?cacheid=6da2bca0" },
{ DYNAMIC_CONTENT, "/ROOT%23%3F/skin/index.css" },
@ -119,6 +117,8 @@ const ResourceCollection resources200Uncompressible{
{ STATIC_CONTENT, "/ROOT%23%3F/skin/favicon/favicon-16x16.png?cacheid=a986fedc" },
{ DYNAMIC_CONTENT, "/ROOT%23%3F/skin/favicon/favicon-32x32.png" },
{ STATIC_CONTENT, "/ROOT%23%3F/skin/favicon/favicon-32x32.png?cacheid=79ded625" },
{ DYNAMIC_CONTENT, "/ROOT%23%3F/skin/favicon/favicon.ico" },
{ STATIC_CONTENT, "/ROOT%23%3F/skin/favicon/favicon.ico?cacheid=fba03a27" },
{ DYNAMIC_CONTENT, "/ROOT%23%3F/skin/favicon/mstile-144x144.png" },
{ STATIC_CONTENT, "/ROOT%23%3F/skin/favicon/mstile-144x144.png?cacheid=c25a7641" },
{ DYNAMIC_CONTENT, "/ROOT%23%3F/skin/favicon/mstile-150x150.png" },
@ -487,8 +487,8 @@ TEST_F(ServerTest, MimeTypes)
{ "/catalog/v2/root.xml", "application/atom+xml;profile=opds-catalog;kind=navigation" },
{ "/skin/search-icon.svg", "image/svg+xml" },
{ "/skin/bittorrent.png", "image/png" },
{ "/skin/favicon/favicon.ico", "text/plain" }, // !!!
{ "/skin/i18n/en.json", "text/plain" }, // !!!
{ "/skin/favicon/favicon.ico", "image/x-icon" },
{ "/skin/i18n/en.json", "application/json" },
{ "/skin/fonts/Roboto.ttf", "application/font-ttf" },
{ "/suggest?content=zimfile&term=ray", "application/json; charset=utf-8" },
};