php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #10070 incorrect ob_gzhandler implementation
Submitted: 2001-03-29 21:21 UTC Modified: 2001-04-30 15:52 UTC
From: mnot at akamai dot com Assigned:
Status: Closed Package: Zlib related
PHP Version: 4.0 Latest CVS (29/03/2001) OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: mnot at akamai dot com
New email:
PHP Version: OS:

 

 [2001-03-29 21:21 UTC] mnot at akamai dot com
ob_gzhandler doesn't appear to set a Vary: header on
responses, which means that proxy caches could store a
compressed version of the resource and serve it to clients
which can't handle the encoding. This is very difficult to
debug for Web sites, and should be fixed ASAP.

For an example of the proper headers to send, see the PHP at:
  http://www.mnot.net/cgi_buffer/

Also, in my experience, some versions of MSIE don't handle
deflate compession correctly, even though their
Accept-Encoding claims they do. It might be better to avoid
deflate altogether, as gzip support is pretty much the
unwritten standard.

Cheers,

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-03-30 13:07 UTC] avsm@php.net
Applied a patch to add Vary: headers if we add a Content-Encoding: header.

Regarding the browser compatibility with Deflate, I think we should just leave it like it is.  _They_ break the RFC; encourage people to upgrade to modern, non-broken browsers instead ?
 [2001-03-30 14:59 UTC] sniper@php.net
If a browser breaks RFCs -> not our problem. 
Closed.

--Jani

 [2001-03-30 19:45 UTC] avsm@php.net
Just to clarify a bit more, and see if a workaround is
worthwhile:

Currently, if both gzip and deflate are present in the
Accept-Encoding, we will prefer the gzip.

The only good reason for a workaround in the code is if
a widespread browser presents deflate only, and then
proceeds to break.  Do these broken versions of IE present
Accept-Encoding: deflate _only_ ?  And which versions are
they?

Anil
 [2001-04-02 00:53 UTC] mnot at akamai dot com
IIRC, it advertises both, so it shouldn't be an issue. I
don't have a windows box around to make sure with... 

 [2001-04-30 15:52 UTC] jmoore@php.net
This should have been resolved with various patches that have been added recently, please test with latest CVS and reopen if this is not the case. (Although once again can we really write workarounds for every browser that breaks the standards?)

- James
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Thu Aug 06 02:01:24 2020 UTC