Edit report at https://bugs.php.net/bug.php?id=40324&edit=1
ID: 40324 Updated by: m...@php.net Reported by: nicolas dot grekas+php at gmail dot com Summary: Create a way to capture/unset headers sent by ob_gzhandler ? -Status: Open +Status: Feedback Type: Feature/Change Request -Package: Feature/Change Request +Package: Zlib related Operating System: all PHP Version: 5.2.0 -Assigned To: +Assigned To: mike Block user comment: N Private report: N New Comment: Not enough information was provided for us to be able to handle this bug. Please re-read the instructions at http://bugs.php.net/how-to-report.php If you can provide more information, feel free to add it to this bug and change the status back to "Open". Thank you for your interest in PHP. Previous Comments: ------------------------------------------------------------------------ [2007-02-02 12:43:35] nicolas dot grekas+php at gmail dot com Description: ------------ Hi, I would like to implement a fine tuned output compression mechanism, and I can't with any of the actual PHP function. Basically, what I want is a function that does exactly what ob_gzhandler does, but without sending the headers is sends. I've thought about two possibilities to enable this : - the first is to implement a generic way to manage the headers buffer, ie a way to delete a header, not just replace it. This is a very generic solution, and I think it would benefit to PHP in general. - the second would be to add an option, maybe a third parameter, to ob_gzhandler. What do you think of that ? At least, it would be worth for me. Maybe for others too ? Reproduce code: --------------- Here is an example of a simple thing that don't work, but could be interesting : <?php function my_obgz($buffer, $mode) { // This example miss some headers management, // but the basic idea is here. // And in fact, this headers managmement is impossible // with actual the PHP functions. $gz = ob_gzhandler($buffer, $mode); if ($mode == (PHP_OUTPUT_HANDLER_START | PHP_OUTPUT_HANDLER_END)) { if (strlen($gz) < strlen($buffer)) $buffer =& $gz; } else $buffer =& $gz; return $buffer; } ob_start('my_obgz'); ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=40324&edit=1