Httpd 2.4 Multiviews is broken for serveral languages

I’ve noticed a minor bug in apache httpd, present at least since CentOS Linux 7.5.1804 up to current CentOS 9 stream.

For example, in Apache/2.4.62 (CentOS Stream) when I try to load from a web browser “index.html.es” I get the raw html text, not rendered. There is no problem with “index.html.en” or “index.html.de”.

The problem is caused for two reasons:

  1. mod_mime.c seems to be using /etc/mime.types, which defines “application/ecmascript es”.
  2. There is no “mime.conf” in /etc/httpd/conf.d

With a full specification of languages in mime.conf you can remove that “application/ecmascript” definition and map “es” to spanish language.

RemoveType es
AddLanguage es .es

There is a similar problem for turkish (.tr).

So, it seems clear that a “mime.conf” file should be added to httpd rpm package.

1 Like