From:             mmicael at gmail dot com
Operating system: Any
PHP version:      5.4.11
Package:          Output Control
Bug Type:         Bug
Bug description:php return wrong string with HEAD Request Method

Description:
------------
When we do a HEAD Request Method in php 5.4, php continue executing script
even 
if the output buffer exceed the max output_buffering.

the next ob_start, ob_get_contents always return empty string

In php 5.2 and 5.3, the script die after sending the first output buffer
that 
reach  the max output_buffering.

Test script:
---------------
$string = '';
for($i=0;$i<5000;$i++) $string .= '0';

ob_start();
echo "test1";
$content = ob_get_contents();
ob_end_clean();

error_log("1-$content");
echo $string;

ob_start();
echo "test2";
$content .= ob_get_contents();
ob_end_clean();

echo $string;

error_log("2-$content");

Expected result:
----------------
In php 5.2 and 5.3

1-test1

Actual result:
--------------
In php 5.4

1-test1
2-test1

-- 
Edit bug report at https://bugs.php.net/bug.php?id=64152&edit=1
-- 
Try a snapshot (PHP 5.4):   
https://bugs.php.net/fix.php?id=64152&r=trysnapshot54
Try a snapshot (PHP 5.3):   
https://bugs.php.net/fix.php?id=64152&r=trysnapshot53
Try a snapshot (trunk):     
https://bugs.php.net/fix.php?id=64152&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=64152&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=64152&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=64152&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=64152&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=64152&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=64152&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=64152&r=notwrong
Not enough info:            
https://bugs.php.net/fix.php?id=64152&r=notenoughinfo
Submitted twice:            
https://bugs.php.net/fix.php?id=64152&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=64152&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=64152&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=64152&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=64152&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=64152&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=64152&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=64152&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=64152&r=mysqlcfg

Reply via email to