Edit report at http://bugs.php.net/bug.php?id=51269&edit=1

 ID:               51269
 Updated by:       ahar...@php.net
 Reported by:      rcumming at ea dot com
 Summary:          zlib.output_compression Overwrites Vary Header
-Status:           Assigned
+Status:           Closed
 Type:             Bug
 Package:          Zlib Related
 Operating System: Linux
 PHP Version:      5.3.2
 Assigned To:      aharvey

 New Comment:

This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.




Previous Comments:
------------------------------------------------------------------------
[2010-03-11 07:20:23] ahar...@php.net

Automatic comment from SVN on behalf of aharvey
Revision: http://svn.php.net/viewvc/?view=revision&revision=296060
Log: Fixed bug #51269 (zlib.output_compression Overwrites Vary Header).

------------------------------------------------------------------------
[2010-03-11 02:17:31] rcumming at ea dot com

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 





------------------------------------------------------------------------



-- 
Edit this bug report at http://bugs.php.net/bug.php?id=51269&edit=1

Reply via email to