Edit report at https://bugs.php.net/bug.php?id=64152&edit=1

 ID:                 64152
 Updated by:         m...@php.net
 Reported by:        mmicael at gmail dot com
 Summary:            php return wrong string with HEAD Request Method
-Status:             Not a bug
+Status:             Open
 Type:               Bug
 Package:            Output Control
 Operating System:   linux
 PHP Version:        5.4.11
-Assigned To:        
+Assigned To:        mike
 Block user comment: N
 Private report:     N

 New Comment:

Ha, now I understand ;) Yes, this could be a regression.

php_output_header() checks headers_only and sets PHP_OUTPUT_DISABLED.
This leads to php_output_write() return immediately.


Previous Comments:
------------------------------------------------------------------------
[2013-02-07 15:23:20] mmicael at gmail dot com

yes the script continue, but it log 

1-test1
2-test1

as we do a second ob_start ob_get_contents with an echo test2, after the echo 
$string, we should have in the logs

1-test1
2-test1test2

------------------------------------------------------------------------
[2013-02-07 15:16:06] m...@php.net

Cannot reproduce.

I get no output with php-fpm in the response, but in the error_log.

------------------------------------------------------------------------
[2013-02-07 15:06:21] mmicael at gmail dot com

I am using php-fpm

------------------------------------------------------------------------
[2013-02-07 15:03:38] m...@php.net

Which SAPI?
Are you sure, you don't see error_log output there?

------------------------------------------------------------------------
[2013-02-07 14:59:42] mmicael at gmail dot com

it's only doing a HEAD request_method with curl -I for exemple

in php 5.2 and 5.3, the script is stopped after the echo $string;
in php 5.4, he continue bug the ob_get_contents after the echo $string; return 
empty response

------------------------------------------------------------------------


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

    https://bugs.php.net/bug.php?id=64152


-- 
Edit this bug report at https://bugs.php.net/bug.php?id=64152&edit=1

Reply via email to