Bug 53121 - Confusing documentation, gzip and deflate
Confusing documentation, gzip and deflate
Status: NEW
Product: Apache httpd-2
Classification: Unclassified
Component: mod_deflate
PC All
: P2 normal (vote)
: ---
Assigned To: Apache HTTPD Bugs Mailing List
Depends on:
  Show dependency tree
Reported: 2012-04-22 05:30 UTC by Ryan4
Modified: 2014-03-25 21:42 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description Ryan4 2012-04-22 05:30:54 UTC
The module is actually using gzip no matter what client request, so the documentation should warn at the top of documentation, state clearly that this module only output "gzip", no actual deflate is ever supported.


Added in config: 

AddOutputFilterByType DEFLATE text/html text/plain text/xml


curl -I -H  'Accept-Encoding: gzip' http://www.example.com
Content-Encoding: gzip

curl -I -H  'Accept-Encoding: deflate' http://www.example.com
Content-Encoding: gzip

So, no actual deflate is ever supported.
Comment 1 Eric Covener 2012-04-22 11:29:19 UTC
some background:


 What's the difference between the "gzip" and "deflate" HTTP 1.1 encodings?
"gzip" is the gzip format, and "deflate" is the zlib format. They should probably have called the second one "zlib" instead to avoid confusion with the raw deflate compressed data format. While the HTTP 1.1 RFC 2616 correctly points to the zlib specification in RFC 1950 for the "deflate" transfer encoding, there have been reports of servers and browsers that incorrectly produce or expect raw deflate data per the deflate specficiation in RFC 1951, most notably Microsoft. So even though the "deflate" transfer encoding using the zlib format would be the more efficient approach (and in fact exactly what the zlib format was designed for), using the "gzip" transfer encoding is probably more reliable due to an unfortunate choice of name on the part of the HTTP 1.1 authors.
Bottom line: use the gzip format for HTTP 1.1 encoding.
Comment 2 Wim Lewis 2014-03-25 21:42:27 UTC
Can confirm that mod_deflate in Apache 2.4 never uses the deflate encoding, only the gzip encoding.

(As Eric Covener says they use the same actual algorithm, also called "deflate", but the "gzip" and "deflate" content-encodings have slightly different headers.)