From 8dca1e8405f9b2272f437e2216d551d6978fa259 Mon Sep 17 00:00:00 2001
From: Eric Chavaillaz <eric@hemmer.ch>
Date: Fri, 22 Jan 2016 11:55:23 +0100
Subject: [PATCH] [TASK] Add info about Apache version when using mod_filter

Since mod_filter is available since Apache 2.3.7 we need to check for
the apache version in the htaccess file.
Older versions of apache will work as well, even though they do not need
to check for the existence of mod_filter.

A comment is added to inform older Apache versions.

Resolves: #72886
Releases: master, 7.6, 6.2
Change-Id: Ia4905c992b52b2bd540ece0a1c1866aeacf6de85
Reviewed-on: https://review.typo3.org/46150
Reviewed-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Tested-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
---
 _.htaccess | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/_.htaccess b/_.htaccess
index c1198a198efd..910a643c3c11 100644
--- a/_.htaccess
+++ b/_.htaccess
@@ -50,7 +50,15 @@
 		</IfModule>
 	</IfModule>
 
-	# Compress all output labeled with one of the following media types
+	# Compress all output labeled with one of the following media types.
+	#
+	# (!) For Apache versions below version 2.3.7 you don't need to
+	# enable `mod_filter` and can remove the `<IfModule mod_filter.c>`
+	# and `</IfModule>` lines as `AddOutputFilterByType` is still in
+	# the core directives.
+	#
+	# https://httpd.apache.org/docs/current/mod/mod_filter.html#addoutputfilterbytype
+
 	<IfModule mod_filter.c>
 		AddOutputFilterByType DEFLATE application/atom+xml \
 			application/javascript \
-- 
GitLab