fix: headers before flushing (#1622)

* add tests

* fix test

* attempt to send headers when flushing

* Update testdata/only-headers.php

Co-authored-by: Kévin Dunglas <kevin@dunglas.fr>

---------

Co-authored-by: Kévin Dunglas <kevin@dunglas.fr>
This commit is contained in:
Rob Landers
2025-06-01 14:58:36 +02:00
committed by GitHub
parent 68a4548bf4
commit a59b649dac
4 changed files with 32 additions and 0 deletions

11
testdata/only-headers.php vendored Normal file
View File

@@ -0,0 +1,11 @@
<?php
require_once __DIR__.'/_executor.php';
return function () {
header('Content-Type: application/json');
header('HTTP/1.1 204 No Content', true, 204);
echo '{"status": "test"}';
flush();
};