Skip to content

Commit 821c400

Browse files
committed
Fix flush split fallback
1 parent 4952b82 commit 821c400

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

sapi/fpm/fpm/fpm_stdio.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,8 @@ static void fpm_stdio_child_said(struct fpm_event_s *ev, short which, void *arg)
177177
if (!memcmp(buf, &FPM_STDIO_CMD_FLUSH[cmd_pos], sizeof(FPM_STDIO_CMD_FLUSH) - cmd_pos)) {
178178
zlog_stream_finish(log_stream);
179179
start = cmd_pos;
180+
} else {
181+
zlog_stream_str(log_stream, &FPM_STDIO_CMD_FLUSH[0], cmd_pos);
180182
}
181183
cmd_pos = 0;
182184
}

sapi/fpm/tests/log-bwp-msg-flush-split-fallback.phpt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@ $tester->expectLogStartNotices();
3232
$tester->request()->expectEmptyBody();
3333
$tester->terminate();
3434
$lines = $tester->getLogLines(2);
35-
//var_dump($lines);
36-
var_dump($lines[0] === str_repeat('a', 1022) . "\0f\n");
35+
var_dump($lines[0] === str_repeat('a', 1021) . "\0f\n");
3736
var_dump($lines[1] === "abc\n");
3837
$tester->close();
3938

@@ -48,5 +47,3 @@ Done
4847
require_once "tester.inc";
4948
FPM\Tester::clean();
5049
?>
51-
--XFAIL--
52-
Zero byte is not working in the split for some reason

0 commit comments

Comments
 (0)