Bug #11491 Updated: When using ob_start("ob_gzhandler") transient SID gets broken
| From: | derick@php.net | Date: | Thu, 04 Apr 2002 13:47:35 +0000 |
| Subject: | Bug #11491 Updated: When using ob_start("ob_gzhandler") transient SID gets broken | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-4041@lists.php.net to get a copy of this message | ||
ID: 11491
Updated by: derick@php.net
Reported By: alain@valain.com
-Status: Closed
+Status: Open
-Bug Type: Documentation problem
+Bug Type: Feature/Change Request
Operating System: Windows 2000 Server
PHP Version: 4.0.5
New Comment:
reopen as feature request
Previous Comments:
------------------------------------------------------------------------
[2002-04-04 08:41:00] ernest@vogelsinger.at
Please reopen - the very same bug is still alive in PHP 4.1.1
(Win32/Apache).
Problem: Any user-defined output handler MUST be called before
trans-sid's are applied since they may very well modify the HTML
output.
Suggestion: add another (opt) parameter to ob_start, specifying a
first-pass handler which will be called _before_ trans-sid's are
applied. The original first parameter specifies the handler that will
be called _after_ applying the trans-sid's.
BEFORE CHANGE (trans-sid's are broken):
string ob_start('my_handler');
function my_handler($buffer, $mode)
{
// do something useful with $buffer
return ob_gzhandler($buffer, $mode);
}
AFTER CHANGE (trans-sid's should work):
string ob_start('ob_gzhandler','my_handler');
function my_handler($buffer, $mode)
{
// do something useful with $buffer
return $buffer;
}
The PHP engine would first call my_handler(), apply trans-sid's next,
and finally call ob_gzhandler(). This solution seems to be a reasonable
change and shouldn't break existing code.
Thanks for consideration!
Ernest E Vogelsinger
------------------------------------------------------------------------
[2001-12-22 08:40:31] sander@php.net
No feedback. Closing.
------------------------------------------------------------------------
[2001-12-22 08:40:26] sander@php.net
No feedback. Closing.
------------------------------------------------------------------------
[2001-12-01 12:15:00] sebastian@php.net
This should be fixed, please try a recent version of PHP.
------------------------------------------------------------------------
[2001-06-21 14:24:22] sniper@php.net
This should be mentioned in the manual?
Reclassified as docu prob.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/11491
--
Edit this bug report at http://bugs.php.net/?id=11491&edit=1