httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Richards" <apache.ht...@msbr.net>
Subject [users@httpd] Excluding by type on server response with mod_deflate
Date Mon, 21 Jun 2004 23:00:29 GMT
Hi,

We are using Apache 2.0.48 with mod_deflate (and mod_ssl) and we are
attempting to exclude compression of certain mime types based on the
server response. We have an application that serves many files types,
and the mime/type we are interested in is set on the server response.
For example, we have tried the following configuration, where we do not
want to compress zip files (note: the zip file name is not in the
request header).

<Location />
  SetOutputFilter DEFLATE
  BrowserMatch ^Mozilla/4 gzip-only-text/html
  BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html

  SetEnvIfNoCase Request_URI "\.(?:gif|jpe?g|png)$" no-gzip dont-vary
  SetEnvIfNoCase Request_URI "\.(?:zip|pdf)$" no-gzip dont-vary

  SetEnvIfNoCase Content-Type application/x-zip-compressed no-gzip
  dont-vary

   Header append Vary User-Agent env=!dont-vary
</Location>

This configuration does not work: it is ignoring the Content-Type on the
server response and zip files are being sent compressed.

We have also tried using AddOutputFilterByType DEFLATE, to only specify
those types we want compressing. Again, this does not appear to operate
on the server response Content-Type.

Are there any directives or mechanisms available to get mod_deflate to
operate correctly on the mime/type of the server response?

Many thanks,
Mark Richards.

p.s.
(A couple of our observations of AddOutputFilterByType DEFLATE:
 
    - we could only have one AddOutputFilterByType directive, otherwise
    only the last AddOutputFilterByType directive would operate.

    - wildcards were ignored e.g. AddOutputFilterByType application/ms* 
    We had to specify all types explicitly, and with a single
    AddOutputFilterByType directive.

    - did not appear to work on POSTs, only on GETs.)







 


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message