Issue Bug Closed

#16772Content encoding with x-gzip not allowed

Bjrn Kraus 12/08/06, 11:54 updated 06/27/08, 10:52

Description

In t3lib/class.gzip_encode.php, function gzip_accept() has the posibiltity to set “x-gzip” instead of “gzip” as content encoding which is NOT recommended (see developer comment “Added code for the ‘x-gzip’. This is untested”). The IE 7 can’t handle pages with “Content-Encoding: x-gzip” in the header (page was cached by a proxy).

Solution: kick out the code for “x-gzip” ASAP

See http://www.ietf.org/rfc/rfc2616.txt, section 14.3:
Note: Most HTTP/1.0 applications do not recognize or obey qvalues
associated with content-codings. This means that qvalues will not
work and are not permitted with x-gzip or x-compress.

Further information for IE 7:
http://blogs.msdn.com/wndp/archive/2006/08/21/Content-Encoding-not-equal-Content-Type.aspx

function gzip_accepted() {
if (strpos(getenv(“HTTP_ACCEPT_ENCODING”), ‘gzip’) = false) return false;
// if (strpos(getenv("HTTP_ACCEPT_ENCODING"), 'x-gzip') = false) {
// $encoding = ‘gzip’;
// } else {
// $encoding = ‘x-gzip’;
// }

…
(issue imported from #M4623)

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.