summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAllison Reid <root@cooltrainer.org>2022-01-24 16:06:18 -0800
committerAllison Reid <root@cooltrainer.org>2022-01-24 16:06:18 -0800
commit5f783439f7a4068b9a2c0ea6074deedb55a68dc7 (patch)
treed297b1f7855854798344eac8864841df1107a665
parent3c064c850488ede673cc87dfd5da29d36384b8f4 (diff)
downloadshared-mime-info-5f783439f7a4068b9a2c0ea6074deedb55a68dc7.tar.gz
FITS: Add missing `application/fits` and legacy globs
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."
-rw-r--r--data/freedesktop.org.xml.in5
-rw-r--r--tests/mime-detection/list2
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.
<glob pattern="*.epsi"/>
<glob pattern="*.epsf"/>
</mime-type>
- <mime-type type="image/fits">
+ <mime-type type="application/fits">
<comment>FITS document</comment>
<acronym>FITS</acronym>
<expanded-acronym>Flexible Image Transport System</expanded-acronym>
@@ -5371,7 +5371,10 @@ command to generate the output files.
<match type="string" value="SIMPLE =" offset="0"/>
</magic>
<glob pattern="*.fits"/>
+ <glob pattern="*.fit"/>
+ <glob pattern="*.fts"/>
<alias type="image/x-fits"/>
+ <alias type="image/fits"/>
</mime-type>
<mime-type type="image/x-fpx">
<comment>FPX image</comment>
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