Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

mod_filter issue #5015

Closed
xchs opened this issue Nov 11, 2012 · 5 comments
Closed

mod_filter issue #5015

xchs opened this issue Nov 11, 2012 · 5 comments

Comments

@xchs
Copy link
Contributor

xchs commented Nov 11, 2012

Should we consider adding a <IfModule !mod_filter.c> condition to our .htaccess.default to address "legacy" Apache versions, too?

The AddOutputFilterByType directive was moved into the mod_filter module for Apache ≥ 2.3.7. Before, this directive was available directly from the Apache core module. That said, if we have a server environment running e.g. Apache 2.2.x and no mod_filter.c available (or enabled), the entire condition is skipped and thus no AddOutputFilterByType directives are applied.

https://github.com/contao/core/blob/master/.htaccess.default#L72

http://uberspace.de/dokuwiki/webserver:htaccess#kompression
h5bp/html5-boilerplate#1173

http://httpd.apache.org/docs/2.0/mod/core.html#addoutputfilterbytype
http://httpd.apache.org/docs/2.4/mod/mod_filter.html#addoutputfilterbytype

@leofeyer
Copy link
Member

As far as I remember (it is in the other ticket somewhere), the code we have now is compatible with all Apache versions, because some of the legacy things have not been removed although they were said to be. Do we need this change then?

@xchs
Copy link
Contributor Author

xchs commented Nov 12, 2012

some of the legacy things have not been removed although they were said to be

This could very well be true, however, for (legacy) server environments without the mod_filter module it might not work as expected, though. For instance, that seems to be the case on Uberspace.

@leofeyer
Copy link
Member

So how should the whole code block look like then? Isn't <IfModule !mod_filter.c> to unspecific, because it evals to true on Apache < 2.3.7 as well as on Apache >= 2.3.7 but without mod_filter enabled?

@xchs
Copy link
Contributor Author

xchs commented Nov 13, 2012

That's true as well. Perhaps we should only provide a comment to explain the problem.

@leofeyer
Copy link
Member

Right now we are pretty much using the HTML5Boilerplate solution and if they are happy with it, I am too :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants