]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix gzip mimetype mapping
authorCôme Chilliet <come.chilliet@nextcloud.com>
Tue, 3 Jan 2023 13:57:59 +0000 (14:57 +0100)
committerCôme Chilliet <come.chilliet@nextcloud.com>
Fri, 20 Jan 2023 10:22:11 +0000 (11:22 +0100)
PHP now detects it as application/gzip and not application/x-gzip anymore

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
resources/config/mimetypealiases.dist.json
resources/config/mimetypemapping.dist.json
tests/lib/Files/Type/DetectionTest.php

index 1840dca5fb96d7de490842d03e9fa4107a1ce30f..68d39650ad9cbfc3b8cc938e5edb706ca36983d6 100644 (file)
@@ -13,6 +13,7 @@
        "application/font-sfnt": "image",
        "application/font-woff": "image",
        "application/gpx+xml": "location",
+       "application/gzip": "package/x-generic",
        "application/illustrator": "image",
        "application/javascript": "text/code",
        "application/json": "text/code",
@@ -80,7 +81,7 @@
        "application/x-fictionbook+xml": "text",
        "application/x-font": "image",
        "application/x-gimp": "image",
-       "application/x-gzip": "package/x-generic",
+       "application/x-gzip": "application/gzip",
        "application/x-iwork-keynote-sffkey": "x-office/presentation",
        "application/x-iwork-numbers-sffnumbers": "x-office/spreadsheet",
        "application/x-iwork-pages-sffpages": "x-office/document",
        "application/vnd.openxmlformats-officedocument.wordprocessingml.document.oform": "x-office/form",
        "application/vnd.openxmlformats-officedocument.wordprocessingml.document.docxf": "x-office/form-template"
 }
-
index 1c1a0f93c437dc5120c51793bdf76774e5294c5b..ff321657da5f95e2f9be60f2e8f1b9041b54e5c4 100644 (file)
@@ -65,8 +65,8 @@
        "fodt": ["application/vnd.oasis.opendocument.text-flat-xml"],
        "gif": ["image/gif"],
        "gpx": ["application/gpx+xml"],
-       "gz": ["application/x-gzip"],
-       "gzip": ["application/x-gzip"],
+       "gz": ["application/gzip"],
+       "gzip": ["application/gzip"],
        "h": ["text/x-h"],
        "heic": ["image/heic"],
        "heif": ["image/heif"],
index d2fdb18e26dea1cf624e2e6291956215ee8f34f3..079117f562257d6fddc96f03f175037bd0209506 100644 (file)
@@ -71,7 +71,7 @@ class DetectionTest extends \Test\TestCase {
        public function dataDetectContent(): array {
                return [
                        ['/', 'httpd/unix-directory'],
-                       ['/data.tar.gz', 'application/x-gzip'],
+                       ['/data.tar.gz', 'application/gzip'],
                        ['/data.zip', 'application/zip'],
                        ['/testimage.mp3', 'audio/mpeg'],
                        ['/testimage.png', 'image/png'],
@@ -91,7 +91,7 @@ class DetectionTest extends \Test\TestCase {
        public function dataDetect(): array {
                return [
                        ['/', 'httpd/unix-directory'],
-                       ['/data.tar.gz', 'application/x-gzip'],
+                       ['/data.tar.gz', 'application/gzip'],
                        ['/data.zip', 'application/zip'],
                        ['/testimagelarge.svg', 'image/svg+xml'],
                        ['/testimage.png', 'image/png'],