From 52778e9fe29dca1544305237df842edc31125752 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20L=C3=BCtzner?= Date: Wed, 14 Feb 2024 15:39:19 +0100 Subject: [PATCH] Update comicbook file extensions cb7, cba, cbr, cbt and cbz all refer to different types of digital comicbooks. The last letter of the extension indicates the compression algorithm that was used: 7zip, arc, rar, tar or zip. All these filetypes used to have the `application/x-cbr` MIME type assigned to them. However, that has since been deprecated and was replaced with - `application/vnd.comicbook-rar` for rar compressed files and - `application/vnd.comicbook+zip` for rar compressed files. Only these two are officially listed by IANA https://www.iana.org/assignments/media-types/application/vnd.comicbook+zip . cbr and cbz are by far the most common file extensions for comicbooks. There's no official MIME type for cb7, cba or cbt files. However, with rar being a proprietary compression algorithm, FOSS applications will often refuse to handle files that identify themselves as `application/x-cbr`, so I decided to assign extension specific MIME types to them. I've seen these being used by other applications, specifically comic book readers. I've read through the docs on iana.org, but haven't figured out why they chose `-rar`, but `+zip`. This fixes #23. --- src/MimeTypes/MimeTypes.NullableAttributes.cs.pp | 10 +++++----- src/MimeTypes/MimeTypes.cs.pp | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/MimeTypes/MimeTypes.NullableAttributes.cs.pp b/src/MimeTypes/MimeTypes.NullableAttributes.cs.pp index 472f7da..c3b1c2b 100644 --- a/src/MimeTypes/MimeTypes.NullableAttributes.cs.pp +++ b/src/MimeTypes/MimeTypes.NullableAttributes.cs.pp @@ -140,11 +140,11 @@ { "cap", "application/vnd.tcpdump.pcap" }, { "car", "application/vnd.curl.car" }, { "cat", "application/vnd.ms-pki.seccat" }, - { "cb7", "application/x-cbr" }, - { "cba", "application/x-cbr" }, - { "cbr", "application/x-cbr" }, - { "cbt", "application/x-cbr" }, - { "cbz", "application/x-cbr" }, + { "cb7", "application/x-cb7" }, + { "cba", "application/x-cba" }, + { "cbr", "application/vnd.comicbook-rar" }, + { "cbt", "application/x-cbt" }, + { "cbz", "application/vnd.comicbook+zip" }, { "cc", "text/x-c" }, { "cco", "application/x-cocoa" }, { "cct", "application/x-director" }, diff --git a/src/MimeTypes/MimeTypes.cs.pp b/src/MimeTypes/MimeTypes.cs.pp index ad50ea3..ea48020 100644 --- a/src/MimeTypes/MimeTypes.cs.pp +++ b/src/MimeTypes/MimeTypes.cs.pp @@ -140,11 +140,11 @@ { "cap", "application/vnd.tcpdump.pcap" }, { "car", "application/vnd.curl.car" }, { "cat", "application/vnd.ms-pki.seccat" }, - { "cb7", "application/x-cbr" }, - { "cba", "application/x-cbr" }, - { "cbr", "application/x-cbr" }, - { "cbt", "application/x-cbr" }, - { "cbz", "application/x-cbr" }, + { "cb7", "application/x-cb7" }, + { "cba", "application/x-cba" }, + { "cbr", "application/vnd.comicbook-rar" }, + { "cbt", "application/x-cbt" }, + { "cbz", "application/vnd.comicbook+zip" }, { "cc", "text/x-c" }, { "cco", "application/x-cocoa" }, { "cct", "application/x-director" },