Bug #51269 [Opn->Asn]: zlib.output_compression Overwrites Vary Header

From: Date: Thu, 11 Mar 2010 05:26:52 +0000
Subject: Bug #51269 [Opn->Asn]: zlib.output_compression Overwrites Vary Header
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-148503@lists.php.net to get a copy of this message
Edit report at http://bugs.php.net/bug.php?id=51269&edit=1

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



Previous Comments:
------------------------------------------------------------------------
[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


Thread (3 messages)

« previous php.bugs (#148503) next »