httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Richards" <apache.ht...@msbr.net>
Subject Re: [users@httpd] Problem with mod_deflate
Date Wed, 15 Dec 2004 17:28:54 GMT

Shaun,

We had similar problems to you. The zip corruption only occurs with MS
IE, and is a result of how IE handles application/x-zip-compressed. Our
tests showed that non-MS IE browsers handled compressed zip files
correctly.

We attempted to use a deflate exclusion based on Content Type: 

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

However, this did not work due to a "weakness in the filtering model in
2.0" (Nick Kew). 

Our solution: we changed our app to change the mime type of zip files to
something other than application/x-zip-compressed - this supported POSTs
- and also included the following config for explicit GETs:

   SetOutputFilter DEFLATE
   SetEnvIfNoCase Request_URI "\.(?:zip|pdf)$" no-gzip dont-vary

We found certain limitations with AddOutputFilterByType, so doing a
blanket output filter, with certain specified exclusions, served our
purposes better. A better solution would be to have exclusion based on
mime type of the server response, and hopefully that will arrive in 2.1.

Our observed limitations 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

Regards,
Mark Richards.

-----Original Message-----
From: Willingham, Shaun [mailto:usenetx3@plc.mb.ca] 
Sent: Monday, December 13, 2004 8:49 PM
To: users@httpd.apache.org
Subject: [users@httpd] Problem with mod_deflate

Hi all,

I have an issue with mod_deflate, running on Apache 2.0.52.

Until today, I'd been running 2.0.48 with php/mysql no problem. One of
the
users on my discussion forum pointed out that zip files were corrupted,
when they attempted to download from my server.

I isolated the problem to mod_deflate. Apparently compressed binaries
don't like being compressed a second time. Alright, makes sense - I
thought I'd just add a filter to my httpd.conf to not compress .zip,
.exe,
.pdf, etc. This didn't work.

I upgraded to Apache 2.0.52 and updated the zlib lib to 1.2.1. Now when
I
run apache while loading mod_deflate, I get this error:

Syntax error on line 266 of /usr/local/apache/conf/httpd.conf:
Cannot load /usr/local/apache/modules/mod_deflate.so into server:
/usr/local/apache/modules/mod_deflate.so: undefined symbol: deflate

I haven't changed anything. It was working fine before. I figured apache
couldn't find zlib, so I specified where it was at compile time.

Here's the vital info...

My apache configuration directive:

./configure --prefix=/usr/local/apache --enable-module=so
--enable-modules=all 
--enable-mods-shared=all --enable-deflate --with-zlib=/usr/local/zlib

Here's part of my httpd.conf where mod_deflate is loaded: (I won't post
the 
whole thing..)

LoadModule deflate_module      modules/mod_deflate.so

--

Apache works fine if I leave the mod_deflate.so commented out, but I
need this 
module!

Has anyone else had a similar/identical problem? What did you do to fix
it?

I tried downgrading the zlib library, but same results.

S

---------------------------------------------------------------------
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


---------------------------------------------------------------------
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