manpages: force content-type to text/plain for non-html .gz files
authorMichael Stapelberg <michael@stapelberg.de>
Tue, 14 Nov 2017 08:15:23 +0000 (09:15 +0100)
committerMichael Stapelberg <michael@stapelberg.de>
Tue, 14 Nov 2017 08:15:23 +0000 (09:15 +0100)
modules/roles/templates/static-mirroring/vhost/manpages.debian.org.erb

index 8305ca6..c4983a9 100644 (file)
                        Require all denied
                </Files>
 
+               # DefaultType doesn’t work since Apache 2.3.x, so we need to match
+               # non-HTML files to work around https://bugs.debian.org/880542
+               <FilesMatch "(?<!\.html)\.gz$">
+                       ForceType text/plain
+               </FilesMatch>
+
                # To set the correct Content-Type (e.g. text/html).
                RemoveType .gz
                AddEncoding gzip gz