File size: 909 Bytes
1e94262
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
--TEST--
FPM: bug77780 - Headers already sent error incorrectly emitted
--SKIPIF--
<?php include "skipif.inc"; ?>
--EXTENSIONS--
session
--FILE--
<?php

require_once "tester.inc";

$cfg = <<<EOT
[global]
error_log = {{FILE:LOG}}
[unconfined]
listen = {{ADDR}}
pm = static
pm.max_children = 1
EOT;

$code = <<<EOT
<?php
echo str_repeat('asdfghjkl', 150000) . "\n";
EOT;

$tester = new FPM\Tester($cfg, $code);
$tester->start(extensions: ['session']);
$tester->expectLogStartNotices();
$tester
    ->request(
        headers: [
            'PHP_VALUE' => "session.cookie_secure=1",
        ],
        readLimit: 10,
        expectError: true
    );
$tester->request(
        headers: [
            'PHP_VALUE' => "session.cookie_secure=1",
        ]
    )
    ->expectNoError();
$tester->terminate();
$tester->close();

?>
Done
--EXPECT--
Done
--CLEAN--
<?php
require_once "tester.inc";
FPM\Tester::clean();
?>