Bug 66648 - Merging of AddOutputFilterByType directives unclear in documentation
Summary: Merging of AddOutputFilterByType directives unclear in documentation
Status: NEW
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: Documentation (show other bugs)
Version: 2.4.56
Hardware: PC Linux
: P2 normal (vote)
Target Milestone: ---
Assignee: HTTP Server Documentation List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-06-15 00:51 UTC by dcook
Modified: 2023-06-15 00:51 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description dcook 2023-06-15 00:51:37 UTC
It's not clear in the documentation how AddOutputFilterByType directives are added together or overridden. 

If you include 5 AddOutputFilterByType directives at the top level of the server configuration they will be added together (e.g. declared in /etc/apache2/mods-enabled/deflate.conf via IncludeOptional mods-enabled/*.conf in /etc/apache2/apache2.conf), but then you can override all 5 directives by providing 1 AddOutputFilterByType directive in a VirtualHost. 

In that VirtualHost, if you provide 1 AddOutputFilterByType directive inside the Else in an If/Else, for all requests handled by that Else, it will override the 1 directive from higher in the VirtualHost.

--

Personally, I'm happy with this behaviour, because I want to override AddOutputFilterByType for some requests. However, it's not clear in the documentation whether or not this behaviour is intended.

If it is intended, could the documentation be updated to reflect that AddOutputFilterByType will be overridden rather than added to previous directives when changing sections? 

I think the behaviour I noted is documented for AddOutputFilter so maybe even just adding a reference that it has the same behaviour of "any definition made will replace any previous definition made by the AddOutputFilter directive".

Thanks!