Disable mod_deflate on XMLENT filtered files user/tsbere/xmlent_hates_deflate
authorThomas Berezansky <tsbere@mvlc.org>
Thu, 12 Jan 2012 20:37:48 +0000 (15:37 -0500)
committerThomas Berezansky <tsbere@mvlc.org>
Thu, 12 Jan 2012 20:37:48 +0000 (15:37 -0500)
Default configs for Ubuntu, at least, enable mod_deflate too broadly, and
XMLENT filtering needs to happen before mod_deflate kicks in.

Because we can't change the filter order, instead disable mod_deflate for
those files we have enabled XMLENT filtering, by use of the no-gzip ENV.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Open-ILS/examples/apache/eg_vhost.conf

index 82872da..5e9fe6d 100644 (file)
@@ -223,6 +223,7 @@ RewriteRule . - [E=locale:en-US]
     XMLEntContentType "text/html; charset=utf-8"
     AddOutputFilter INCLUDES;XMLENT .xhtml
     AddOutputFilter INCLUDES;XMLENT .html
+    SetEnv no-gzip
     allow from all
 </LocationMatch>
 
@@ -231,6 +232,7 @@ RewriteRule . - [E=locale:en-US]
     Options +Includes
     XMLEntContentType "application/vnd.mozilla.xul+xml"
     AddOutputFilter INCLUDES;XMLENT .xul
+    SetEnv no-gzip
     allow from all
 </LocationMatch>
 
@@ -614,6 +616,21 @@ RewriteRule ^/openurl$ ${openurl:%1} [NE,PT]
 
     LogFormat '"%r" %{outstream}n/%{instream}n (%{ratio}n%%)' deflate
     CustomLog /var/log/apache2/deflate_log deflate
+
+    # There are problems with XMLENT and mod_deflate - so lets disable it
+    # This is where we don't have a pre-existing LocationMatch directive earlier
+    <LocationMatch /opac/.*\.xml$>
+        SetEnv no-gzip
+    </LocationMatch>
+    <LocationMatch /opac/[a-z]{2}-[A-Z]{2}/extras/slimpac/.*\.html$>
+        SetEnv no-gzip
+    </LocationMatch>
+    <LocationMatch /reports/.*\.xhtml$>
+        SetEnv no-gzip
+    </LocationMatch>
+    <LocationMatch /conify/.*\.html$>
+        SetEnv no-gzip
+    </LocationMatch>
 </IfModule>