|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2009-01-21 10:27 UTC] wharmby at uk dot ibm dot com
Description: ------------ Missing gzip headers in output from gzencode() when FORCE_DEFLATE option specified. Problem persists for all values for $level argument. Problem seen at PHP 6 level only. I will be dropping some new PHPT shortly; the PHP 6 version will be tagged with XFAIL section because of this defect. Reproduce code: --------------- <?php var_dump(bin2hex(gzencode(b"Hello World", -1, FORCE_GZIP))); var_dump(bin2hex(gzencode(b"Hello World", -1, FORCE_DEFLATE))); ?> Expected result: ---------------- Based on output for same script from 5.2/5.3 I expect something like: unicode(62) "1f8b0800000000000003f348cdc9c95708cf2fca49010056b1174a0b000000" unicode(58) "1f8b0800000000000003789cf348cdc9c95708cf2fca490100180b041d" Actual result: -------------- unicode(62) "1f8b080000000000000bf348cdc9c95708cf2fca49010056b1174a0b000000" unicode(38) "789cf348cdc9c95708cf2fca490100180b041d" PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Nov 17 01:00:01 2025 UTC |
Hi Mike Can you expand on your reason for closing this defect as bogus a little more please given that: (1) The same test produces different results on php 5.2 and 5.3, i.e the output from gzencode() with FORCE_DEFLATE includes the zlib headers in both cases. (2) The PHP manual says for the gzencode() option 'encoding mode' "If you use FORCE_DEFLATE, you get a standard zlib deflated string (inclusive zlib headers) after the gzip file header but without the trailing crc32 checksum. " This suggests that the output should include zlib headers. So if the PHP 6 behaviour is correct does this not mean there is a bug in both PHP 5 code and description of the command in the PHP manual ? I raised the bug against PHP 6 as its behaviour differed to previous releases and I assumed it was a bug in the new zlib code but if the bug lies in PHP % I am happy to fix up the new PHPT's and open a defect against PHP 5. Regards Andy Andy Wharmby E-mail: andy_wharmby@uk.ibm.com