Bug #75870 [Asn->Nab]: header() terminates execution when Content-Length is 0
| From: | bukka@php.net | Date: | Wed, 01 Dec 2021 20:50:35 +0000 |
| Subject: | Bug #75870 [Asn->Nab]: header() terminates execution when Content-Length is 0 | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-238104@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: Assigned
+Status: Not a bug
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:
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.
Previous Comments:
------------------------------------------------------------------------
[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...
------------------------------------------------------------------------
[2018-01-24 23:12:02] requinix@php.net
Were permissions on /var/www/html set to allow the new file? Try in /tmp instead.
And do you have the gzip module installed and enabled in nginx? Try without.
------------------------------------------------------------------------
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