#23488 [Opn]: zlib output compression clobbers user-supplied Vary: header

From: Date: Sat, 02 Aug 2003 16:08:03 +0000
Subject: #23488 [Opn]: zlib output compression clobbers user-supplied Vary: header
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-45228@lists.php.net to get a copy of this message
ID: 23488 Updated by: moriyoshi@php.net Reported By: m at mlcastle dot net Status: Open Bug Type: Feature/Change Request Operating System: GNU/Linux 2.2.25 PHP Version: 4.3.1 New Comment: Same as bug #24827 Previous Comments: ------------------------------------------------------------------------ [2003-05-05 05:52:41] moriyoshi@php.net This issue has long been recognised since zlib.compression feature was implemented. The behaviour is quite expected => marking this as a feature request. ------------------------------------------------------------------------ [2003-05-05 04:44:46] m at mlcastle dot net If zlib.output_compression is on, then it (sensibly) sends a Vary: Accept-Encoding header to the browser. However, if the user's script has sent its own Vary: header, then that header will get clobbered by zlib's. Better solutions would be to either: * let the user's header take preference, and caution the user to include Accept-Encoding in the custom one, or * magically combine the user's header and the zlib one. Refernece: RFC 2616 (HTTP/1.1 Spec), Section 14.44 Sample script: <?php ini_set('zlib.output_compression', 'on'); // do something with $_SERVER['HTTP_ACCEPT_LANGUAGE'] header('Vary: Accept-Language'); // output something ?> ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=23488&edit=1

« previous php.bugs (#45228) next »