mirror of
https://github.com/dunglas/frankenphp.git
synced 2025-12-24 13:38:11 +08:00
* fix: reset sapi response code It turns out that the sapi response code is NOT reset between requests by the zend engine. This resets the code for cgi-based requests. fixes: #960 * update response header test * fix assertion * appears to affect workers too
16 lines
315 B
PHP
16 lines
315 B
PHP
<?php
|
|
|
|
require_once __DIR__.'/_executor.php';
|
|
|
|
return function () {
|
|
header('Foo: bar');
|
|
header('Foo2: bar2');
|
|
header('Invalid');
|
|
header('I: ' . ($_GET['i'] ?? 'i not set'));
|
|
if ($_GET['i'] % 3) {
|
|
http_response_code($_GET['i'] + 100);
|
|
}
|
|
|
|
var_export(apache_response_headers());
|
|
};
|