RE: [users@httpd] problem when using mod_deflate and zip files and IE6

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The fact that everything works when you use the AddOutputFilterByType does not surprise me since I never managed to have mod_deflate do any compression using that directive. See also http://issues.apache.org/bugzilla/show_bug.cgi?id=31226. Using

    AddOutputFilterByType DEFLATE text/html text/plain text/css
would yield the same result as removing
	SetOutputFilter DEFLATE
altogether: you can assume no compression is done.

If the configuration included in your post is at the server level (with SetOutputFilter DEFLATE), I can see no reason why files having .zip extensions should be compressed by mod_deflate. 

I would check the headers of the responses to see if the Content-Encoding header is set. HTTP Watch (MS IE) is very handy for debugging this kind of issues. Otherwise use a sniffer to capture the responses from the server (Ethereal, tcpdump, snoop). You may end up discovering that the .zip files are not compressed but that another type of file is which causes the problem.

-ascs

-----Original Message-----
From: robert rottermann [mailto:robert@xxxxxxxxx] 
Sent: Friday, May 13, 2005 12:35 PM
To: users@xxxxxxxxxxxxxxxx
Subject: Re: [users@httpd] problem when using mod_deflate and zip files and IE6

as soon as I have mod_deflat logged and
SetOutputFilter DEFLATE
 it does not work anymore.
 From the deflate log I do not get any usefull info, since no matter what the settings are, it does not show any compression ratio Using
    # deflate.log, log compression ratio on each request
    DeflateFilterNote ratio
    LogFormat '"%r" %b (ratio=%{ratio}n) "%{User-agent}i"' deflate
    CustomLog /var/log/apache2/deflate.log deflate


I only get lines as the following .
"GET /ploneNS4.css HTTP/1.1" 794 (ratio=-) "Mozilla/4.0 (compatible; 
MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50110)"

This is also something that makes me wonder. Why do I not get a 
compression ration
.
Now I achieved serving zip f iles by using
    AddOutputFilterByType DEFLATE text/html text/plain text/css
instead of
    SetOutputFilter DEFLATE

Why is this so??
thanks again for your help
Robert

<IfModule mod_deflate.c>
    DeflateCompressionLevel 9
    
    # NOTE: Due to a bug in mod_setenvif up to Apache 2.0.48
    # the above regex won't work. You can use the following
    # workaround to get the desired effect:
    #BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
    
    # Don't compress images, java scripts and style sheets
    #_robert_ pdf, gz hinzugeuegt
    SetEnvIfNoCase Request_URI \
    \.(?:gif|jpe?g|png|js|css|pdf|gz|zip)$ no-gzip dont-vary
    
    # Make sure proxies don't deliver the wrong content
    # this needs mod_headers but it's very important
    # so I don't add a IfModule around it
    #Header append Vary User-Agent env=!dont-vary

    <Location />
        # compress content with type html, text, and css
        AddOutputFilterByType DEFLATE text/html text/plain text/css
        <IfModule mod_headers.c>
            # properly handle requests coming from behind proxies
            Header append Vary User-Agent env=!dont-vary
        </IfModule>
    </Location>

    # deflate.log, log compression ratio on each request
    DeflateFilterNote ratio
    LogFormat '"%r" %b (ratio=%{ratio}n) "%{User-agent}i"' deflate
    CustomLog /var/log/apache2/deflate.log deflate

    #Properly handle old browsers that do not support compression
    BrowserMatch ^Mozilla/4 gzip-only-text/html
    BrowserMatch ^Mozilla/4\.0[678] no-gzip
    BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
</IfModule>


---------------------------------------------------------------------
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@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux