Hi folks;I am attempting to use mod_deflate to compress ONLY text output files (since "compressing" images is a waste, natch)
I have the following in my httpd.conf file: # # Deflate text if the user's browser can handle it #AddOutputFilterByType DEFLATE text/html text/plain text/xml DeflateFilterNote Input instream
DeflateFilterNote Output outstream DeflateFilterNote Ratio ratio LogFormat '"%r" %{outstream}n/%{instream}n (%{ratio}n%%)' deflate CustomLog /var/log/httpd.deflate_log deflate Which, for static sites, works fine.However, I have a site which is entirely built by a CGI program. That program returns a proper "Content-Type:" header; some content is text/html, some might be text/xml, some might be image/gif, some might be image/jpeg, etc.
Well, it appears that Apache isn't actually looking at those headers, and the deflate filter is "compressing" all output - including the stuff that can't be compressed!
While this isn't a huge deal (it just doesn't get any smaller) it is hitting my CPU pretty hard.
Here's an example from the deflate log file: "GET /cgi-ticker/akcs-www HTTP/1.1" 6466/21060 (30%) "GET /cgi-ticker/akcs-www?getavatar=foxymoron HTTP/1.1" 8459/8696 (97%) "GET /smilies/money.gif HTTP/1.1" 207/202 (102%)First line, good, second not so good (that's a JPEG file!) and the third, NO NO NO NO!
How come, given that I specified the types I wanted to be "deflated" above? -- Karl Denninger (karl@xxxxxxxxxxxxx) http://www.denninger.net %SPAMBLOCK-SYS: Matched [apache.org], message ok --------------------------------------------------------------------- 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