From 5f783439f7a4068b9a2c0ea6074deedb55a68dc7 Mon Sep 17 00:00:00 2001 From: Allison Reid Date: Mon, 24 Jan 2022 16:06:18 -0800 Subject: FITS: Add missing `application/fits` and legacy globs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Make `image/fits` an alias, matching its designation of a subset of the FITS standard, as per https://datatracker.ietf.org/doc/html/rfc4047#section-5 - "The general nature of the full FITS standard requires the use of the media type "application/fits". Nevertheless, the principal intent for a great many FITS files is to convey a single data array in the PHDU, and such arrays are very often 2-dimensional images. Several common image viewing applications already display single-HDU FITS files, and the prototypes for virtual observatory projects specify that data provided by web services be conveyed by the data array in the PHDU. These uses justify the registration of a second media type, namely "image/fits", for files which use the subset of the standard described by the original FITS standard paper." The existing alias `image/x-fits` was common before the standardization of `application/fits` and `image/fits`, so it should stay. Current standards and historical contexts can be found here: - https://fits.gsfc.nasa.gov/fits_standard.html - https://listmgr.nrao.edu/pipermail/fitsmime/2002-December/thread.html - https://www.ucolick.org/~sla/fits/mime/comments.html Add missing eight-dot-three-style `*.fit` and `*.fts` globs for legacy files, matching the list supported by `libvips`, i.e., https://github.com/libvips/libvips/blob/757d03100566368e5d06c7355e73c1215dd34968/libvips/foreign/fits.c#L132 And as discussed in the FITS standard definition (`fits_standard40aa-le.pdf`) - "In the absence of other information it is reasonably safe to presume that a file name ending in ‘.fits’ is intended to be a FITS file. Nevertheless, there are other commonly used ex- tensions; e.g., ‘.fit’, ‘.fts’, and many others not suitable for listing in a media type registration." --- data/freedesktop.org.xml.in | 5 ++++- tests/mime-detection/list | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/data/freedesktop.org.xml.in b/data/freedesktop.org.xml.in index 0c0cf9d9..2b62ccc5 100644 --- a/data/freedesktop.org.xml.in +++ b/data/freedesktop.org.xml.in @@ -5363,7 +5363,7 @@ command to generate the output files. - + FITS document FITS Flexible Image Transport System @@ -5371,7 +5371,10 @@ command to generate the output files. + + + FPX image diff --git a/tests/mime-detection/list b/tests/mime-detection/list index 85eeb79c..8a07f5af 100644 --- a/tests/mime-detection/list +++ b/tests/mime-detection/list @@ -16,7 +16,7 @@ test.eps image/x-eps # https://bugs.freedesktop.org/show_bug.cgi?id=55264 Oriental_tattoo_by_daftpunk22.eps image/x-eps GammaChart.exr image/x-exr -test.fit image/fits x +test.fit application/fits test.fli video/x-flic ox test.gif image/gif example.heic image/heif -- cgit v1.2.1