|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #24827 ob_gzhandler overrides Vary header
Submitted: 2003-07-27 06:09 UTC Modified: 2003-08-02 11:07 UTC
From: phpnet at shredzone dot de Assigned:
Status: Closed Package: Zlib related
PHP Version: 4.3.2 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
37 + 8 = ?
Subscribe to this entry?

 [2003-07-27 06:09 UTC] phpnet at shredzone dot de
I am using ob_gzhandler to compress the page output. Now I need to add an 'accept-language' to the Vary header, because my page content depends on the language settings of the browser.

Anyhow, it is impossible to change the Vary header when using ob_gzhandler. It seems like ob_gzhandler is overriding an existing Vary header just before returning the compressed content to the browser.

Expected behaviour: ob_gzhandler should check if a Vary header has already been set. If so, it should only ADD an "accept-encoding" unless already present, or should not change the Vary header at all.

Reproduce code:
  header("vary: accept-encoding,accept-language");

Expected result:
A HTTP header "vary: accept-encoding,accept-language" being returned.

Actual result:
A HTTP header "Vary: Accept-Encoding" (note the uppercase letters) will always be returned.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2003-07-27 13:16 UTC]
This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at
In case this was a documentation problem, the fix will show up soon at

In case this was a website problem, the change will show
up on the site and on the mirror sites in short time.
Thank you for the report, and for helping us make PHP better.

 [2003-08-02 11:07 UTC]
Same as bug #23488
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Jul 19 02:01:30 2024 UTC