h5bp/server-configs

[apache] Incorrect mimetype for opentype

aitte opened this issue · 1 comments

Apache

The "font/opentype" mimetype is invalid. Mime consists of a content type before the slash and a subtype after the slash.

The valid content types are application/, audio/, example/, image/, message/, model/, multipart/, text/ and video/. There is no such thing as "font/".

Application-specific binary data such as javascript, fonts and so on are all registered under application/*. Fonts tend to use "application/font-NAME".

OpenType doesn't have a formal registration, but they have some informal types. Informal subtypes must be prefixed with "x-".

The best and most common informal mime type for it is: application/x-font-opentype.

I just discovered that the Nginx conf already does the right thing in this regard, but Apache is affected.

Fixed in the latest pull request.