openpreserve / odf-validator

Open source Open Document Format (ODF) validation
http://odf.openpreservation.org/
BSD 3-Clause "New" or "Revised" License
3 stars 0 forks source link

ODF_4: Extension and MIME type #92

Closed carlwilson closed 7 months ago

carlwilson commented 8 months ago

The MIME type MUST match the extension. The pairs are:

A MIME type declaration is required in the first line of the file mimetype and an entry in the file \META-INF\manifest.xml with: <manifest:file-entry manifest:full-path="/" manifest:version="INSERT ODF VERSION" manifest:media-type="INSERT MIME TYPE"/>.

This means that the document will always take the form of a zipped package.

Browsers use the MIME type, not the file extension, to determine how to process a URL, so it's important that web servers send the correct MIME type in the response's Content-Type header. If this is not correctly configured, browsers are likely to misinterpret the contents of files, sites will not work correctly, and downloaded files may be mishandled.

Hence for the purpose of archiving quality information it is important the extension of the file matches the MIME type.

carlwilson commented 7 months ago

Closed by #104