#23488 [NEW]: zlib output compression clobbers user-supplied Vary: header
| From: | m at mlcastle dot net | Date: | Mon, 05 May 2003 09:44:46 +0000 |
| Subject: | #23488 [NEW]: zlib output compression clobbers user-supplied Vary: header | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-39063@lists.php.net to get a copy of this message | ||
From: m at mlcastle dot net
Operating system: GNU/Linux 2.2.25
PHP version: 4.3.1
PHP Bug Type: Zlib Related
Bug description: zlib output compression clobbers user-supplied Vary: header
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 bug report at http://bugs.php.net/?id=23488&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=23488&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=23488&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=23488&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=23488&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=23488&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=23488&r=support
Expected behavior: http://bugs.php.net/fix.php?id=23488&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=23488&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=23488&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=23488&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=23488&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=23488&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=23488&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=23488&r=gnused