Skip to content

Commit 118acea

Browse files
[HttpFoundation] move flushing outside of Response::closeOutputBuffers
1 parent ee9df24 commit 118acea

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/HttpFoundation/Response.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -384,6 +384,7 @@ public function send()
384384
fastcgi_finish_request();
385385
} elseif (!\in_array(\PHP_SAPI, ['cli', 'phpdbg'], true)) {
386386
static::closeOutputBuffers(0, true);
387+
flush();
387388
}
388389

389390
return $this;
@@ -1236,7 +1237,6 @@ public static function closeOutputBuffers(int $targetLevel, bool $flush): void
12361237
while ($level-- > $targetLevel && ($s = $status[$level]) && (!isset($s['del']) ? !isset($s['flags']) || ($s['flags'] & $flags) === $flags : $s['del'])) {
12371238
if ($flush) {
12381239
ob_end_flush();
1239-
flush();
12401240
} else {
12411241
ob_end_clean();
12421242
}

0 commit comments

Comments
 (0)