|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
Patchesworkaround-vary-header-revert (last revision 2010-03-11 01:18 UTC by rcumming at ea dot com)Pull RequestsHistoryAllCommentsChangesGit/SVN commits
[2010-03-11 06:26 UTC] aharvey@php.net
-Status: Open
+Status: Assigned
-Assigned To:
+Assigned To: aharvey
[2010-03-11 07:20 UTC] aharvey@php.net
[2010-03-11 07:22 UTC] aharvey@php.net
-Status: Assigned
+Status: Closed
[2010-03-11 07:22 UTC] aharvey@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 03:00:01 2025 UTC |
Description: ------------ We have an application which requires Vary: Cookie for its caching scheme to work correctly. It's using the header() function to set the header during the request. With PHP 5.2.9/Apache requesting a page with both Accept-Encoding: gzip and without will correctly append Accept-Encoding to the Vary: -- HEAD / HTTP/1.1 Host: www.easports.com HTTP/1.1 200 OK Date: Thu, 11 Mar 2010 01:06:33 GMT Vary: Cookie,Accept-Encoding -- -- HEAD / HTTP/1.1 Host: www.easports.com Accept-Encoding: gzip HTTP/1.1 200 OK Date: Thu, 11 Mar 2010 01:07:37 GMT Vary: Cookie,Accept-Encoding Content-Encoding: gzip -- With PHP 5.3.2 the Vary header is overwritten when the content is served as gzip: --- HEAD / HTTP/1.1 Host: devsonet.dev.easports.ea.com HTTP/1.1 200 OK Date: Thu, 11 Mar 2010 01:10:00 GMT Vary: Cookie,Accept-Encoding -- -- HEAD / HTTP/1.1 Host: devsonet.dev.easports.ea.com Accept-Encoding: gzip HTTP/1.1 200 OK Date: Thu, 11 Mar 2010 01:10:53 GMT Vary: Accept-Encoding Content-Encoding: gzip -- The attached diff will make the application work as expected. This was based on reverting a chunk that had changed between PHP 5.2.9 and PHP 5.2.13. This diff was clearly put in there to fix another bug so it's *not* intended to be applied; it's just for demonstration purposes