mime.conf ignores dependency to mod_include

Bug #1675184 reported by Stephan on 2017-03-22
This bug affects 1 person
Affects Status Importance Assigned to Milestone
apache2 (Ubuntu)

Bug Description

In Ubuntu 16.04 LTS the file installed by apache2 as /etc/apache2/mods-available/mime.conf includes the following section:

        # Filters allow you to process content before it is sent to the client.
        # To parse .shtml files for server-side includes (SSI):
        # (You will also need to add "Includes" to the "Options" directive.)
        AddType text/html .shtml
        AddOutputFilter INCLUDES .shtml

The AddOutputFilter line needs mod_include to function correctly. If mod_include is not enabled, but mime.conf is enabled, then any request to a file ending on .shtml will cause the following error being printed in the log:

AH00082: an unknown filter was not added: includes

This can be quite irritating.

It can be fixed by only adding the output filter in case the required mod_include is available:

<IfModule mod_include.c>
        AddOutputFilter INCLUDES .shtml

In case this fix is something Ubuntu does not want to fix but expects from upstream please report accordingly upstream to have a fix included in Ubuntu.

Stephan (world-wide) on 2017-03-22
description: updated
Nish Aravamudan (nacc) wrote :

Hello and thank you for reporting this issue.

Did you change your config to include the stated item:

        # (You will also need to add "Includes" to the "Options" directive.)


Just wondering if that alone fixes it? Given that this code is inherited from Debian, we probably want to fix it there, would you be willing to report the bug there or see if it has already been filed?

Changed in apache2 (Ubuntu):
status: New → Incomplete
Stephan (world-wide) wrote :

Hello Nish,

please find some additional details below.

I don't use mod_include and don't plan to. I simply want to have the mime types from mime.conf.

If I would load mod_include then there would be no error reported. shtml would still require to have the Includes set in the options, but this is a different topic.

Here the problem is that an OutputFilter is added which is not available in Apache, thus producing an error in the log. This would happen even if the file does not exist like trying to load http://example.com/notexist.shtml.

mime.conf should only add OutputFilter for modules actually available. So adding the IfModule as stated above ensures this dependency.

I agree that this might be something needed to be fixed upstream. I indicated this in the initial report. Unfortunately I am not that experienced on how to best report this (either with Debian or with Apache). So it would be great if someone more familiar with the process involved could do this. I didn't find any Debian bug report mentioning mime.conf and AddOutputFilter.

Launchpad Janitor (janitor) wrote :

[Expired for apache2 (Ubuntu) because there has been no activity for 60 days.]

Changed in apache2 (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers