Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-dev] MIME type for .otf file extension

We don't have parity with apache httpd, never had.
And even small changes made to our mime.properties for existing entries has historically been met with surprise from folks that rely on the existing mappings. (and yes, we have people relying on otf belonging to open document)

A better solution, instead of changing an existing mapping, is to allow configuring the `org.eclipse.jetty.http.MimeTypes` object using the apache httpd's `mime.types` file (which has a very liberal license to encourage reuse), for those folks (like yourself) that want apache httpd parity.

Historical note: The otf extension was added as part of a series of commits to Jetty 6.1.8 to add all of the OpenDocument formats, due to issue JETTY-491 around Jan 3, 2008.

- Joakim

On Tue, Aug 13, 2024 at 6:42 PM Basil Crow via jetty-dev <jetty-dev@xxxxxxxxxxx> wrote:
The .otf file extension appears in two different IANA MIME type registrations:

- https://www.iana.org/assignments/media-types/application/vnd.oasis.opendocument.formula-template
- https://www.iana.org/assignments/media-types/font/otf

Given the choice between two equally valid MIME types, which should be
preferred?

Preference should be given to font/otf because a .otf file on a web
server is more likely to be an OpenType Font (e.g. using the
@font-face CSS rule as described in
https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face and other
documents) than an OpenDocument Formula Template.

This preference is also shared by Apache httpd:

https://github.com/apache/httpd/blob/c4f35264e9f30272cd12d9e9d47f0eb041d93b77/docs/conf/mime.types#L1536

In https://github.com/jetty/jetty.project/pull/12097 I submitted a
pull request to use the font/otf MIME type for the .otf file
extension. An Eclipse Jetty core developer requested changes on that
pull request on the grounds that it has eliminated a valid extension
mapping. That review failed to take into account the point made in the
first sentence of the pull request—that between two equally valid MIME
type choices, preference should be given to font/otf for the reason
given above.
_______________________________________________
jetty-dev mailing list
jetty-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/jetty-dev

Back to the top