Project

General

Profile

Actions

Bug #16772

closed

Content encoding with x-gzip not allowed

Added by Bjrn Kraus almost 18 years ago. Updated over 16 years ago.

Status:
Closed
Priority:
Must have
Assignee:
Category:
-
Target version:
-
Start date:
2006-12-08
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.0
PHP Version:
5
Tags:
Complexity:
Is Regression:
Sprint Focus:

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)


Files

0004623.patch (8.5 KB) 0004623.patch Administrator Admin, 2007-03-16 13:16
0004623_w.patch (1.77 KB) 0004623_w.patch Administrator Admin, 2007-03-16 13:16
0004623_v2.patch (23.1 KB) 0004623_v2.patch Administrator Admin, 2007-03-27 14:05
0004623_v2_w.patch (4.85 KB) 0004623_v2_w.patch Administrator Admin, 2007-03-27 14:05
Actions

Also available in: Atom PDF