Bug #75870 [Nab->Dup]: header() terminates execution when Content-Length is 0

From: Date: Wed, 01 Dec 2021 22:36:27 +0000
Subject: Bug #75870 [Nab->Dup]: header() terminates execution when Content-Length is 0
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-238108@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=75870&edit=1 ID: 75870 Updated by: bukka@php.net Reported by: km dot wrona at gmail dot com Summary: header() terminates execution when Content-Length is 0 -Status: Not a bug +Status: Duplicate Type: Bug Package: FPM related Operating System: Alpine PHP Version: 7.1.13 Assigned To: bukka Block user comment: N Private report: N New Comment: Sorry I know what this is about actually - it is most likely duplicate of https://bugs.php.net/bug.php?id=72185 Previous Comments: ------------------------------------------------------------------------ [2021-12-01 20:50:35] bukka@php.net I'm marking this as not a bug for now. If you still think that this is a bug, please update your ticket with a reasoning behind it. ------------------------------------------------------------------------ [2021-11-30 22:09:24] bukka@php.net Sorry for the delay in checking this out but I don't think there's anything wrong with this. At least I don't understand why you expect body to show if you set content-length to 0? I don't think FPM should modify it as it was explicitly set by the user so it will send it to the web server (nginx in your case) and body is then ignored. ------------------------------------------------------------------------ [2018-01-25 08:15:32] km dot wrona at gmail dot com No gzip enabled. ------------------------------------------------------------------------ [2018-01-25 00:52:04] requinix@php.net Can you check that gzip thing with nginx? Though I haven't seen anything to explicitly state it cuts off content, I know it will respect a Content-Length to some degree. ------------------------------------------------------------------------ [2018-01-25 00:49:34] km dot wrona at gmail dot com Modified the script again to be: ---- touch('/tmp/1'); header('content-length:0',false, null); touch('/tmp/2'); die('done'); ---- Both 1 and 2 exist, no "done" is displayed, so it looks like it does not terminate... ------------------------------------------------------------------------ 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=75870 -- Edit this bug report at https://bugs.php.net/bug.php?id=75870&edit=1

« previous php.bugs (#238108) next »