From 641d9446d44986edcfe418790a8832afafc69245 Mon Sep 17 00:00:00 2001 From: Dennis Stritzke Date: Mon, 4 Oct 2021 16:56:35 +0200 Subject: [PATCH] Changing sqlite3 to application/vnd.sqlite3 and retaining application/x-sqlite3 as an alias. The generated supported mimes list also includes the `.msi` as it was not included through its original commit f85da30e. #170 --- mimetype_test.go | 2 +- supported_mimes.md | 5 +++-- tree.go | 5 +++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/mimetype_test.go b/mimetype_test.go index c0db47d2..f74c42df 100644 --- a/mimetype_test.go +++ b/mimetype_test.go @@ -167,7 +167,7 @@ var files = map[string]string{ "shp.shp": "application/octet-stream", "shx.shx": "application/octet-stream", "so.so": "application/x-sharedlib", - "sqlite.sqlite": "application/x-sqlite3", + "sqlite.sqlite": "application/vnd.sqlite3", "svg.1.svg": "image/svg+xml", "svg.svg": "image/svg+xml", "swf.swf": "application/x-shockwave-flash", diff --git a/supported_mimes.md b/supported_mimes.md index ef989990..f67f475b 100644 --- a/supported_mimes.md +++ b/supported_mimes.md @@ -1,4 +1,4 @@ -## 164 Supported MIME types +## 165 Supported MIME types This file is automatically generated when running tests. Do not edit manually. Extension | MIME type | Aliases @@ -26,6 +26,7 @@ Extension | MIME type | Aliases **.pdf** | application/pdf | application/x-pdf **.fdf** | application/vnd.fdf | - **n/a** | application/x-ole-storage | - +**.msi** | application/x-ms-installer | application/x-windows-installer, application/x-msi **.aaf** | application/octet-stream | - **.msg** | application/vnd.ms-outlook | - **.xls** | application/vnd.ms-excel | application/msexcel @@ -107,7 +108,7 @@ Extension | MIME type | Aliases **.mobi** | application/x-mobipocket-ebook | - **.lit** | application/x-ms-reader | - **.bpg** | image/bpg | - -**.sqlite** | application/x-sqlite3 | - +**.sqlite** | application/vnd.sqlite3 | application/x-sqlite3 **.dwg** | image/vnd.dwg | image/x-dwg, application/acad, application/x-acad, application/autocad_dwg, application/dwg, application/x-dwg, application/x-autocad, drawing/dwg **.nes** | application/vnd.nintendo.snes.rom | - **.lnk** | application/x-ms-shortcut | - diff --git a/tree.go b/tree.go index 28ad7821..e5466f13 100644 --- a/tree.go +++ b/tree.go @@ -221,8 +221,9 @@ var ( djvu = newMIME("image/vnd.djvu", ".djvu", magic.DjVu) mobi = newMIME("application/x-mobipocket-ebook", ".mobi", magic.Mobi) lit = newMIME("application/x-ms-reader", ".lit", magic.Lit) - sqlite3 = newMIME("application/x-sqlite3", ".sqlite", magic.Sqlite) - dwg = newMIME("image/vnd.dwg", ".dwg", magic.Dwg). + sqlite3 = newMIME("application/vnd.sqlite3", ".sqlite", magic.Sqlite). + alias("application/x-sqlite3") + dwg = newMIME("image/vnd.dwg", ".dwg", magic.Dwg). alias("image/x-dwg", "application/acad", "application/x-acad", "application/autocad_dwg", "application/dwg", "application/x-dwg", "application/x-autocad", "drawing/dwg")