Skip to content

Commit 2a8b717

Browse files
[HttpKernel] Dont close the output stream in debug
1 parent 62faefb commit 2a8b717

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Kernel.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,14 @@ public function terminate(Request $request, Response $response)
149149
}
150150

151151
if ($this->getHttpKernel() instanceof TerminableInterface) {
152+
if (!$this->debug) {
153+
if (function_exists('fastcgi_finish_request')) {
154+
fastcgi_finish_request();
155+
} elseif ('cli' !== PHP_SAPI) {
156+
Response::closeOutputBuffers(0, true);
157+
}
158+
}
159+
152160
$this->getHttpKernel()->terminate($request, $response);
153161
}
154162
}

0 commit comments

Comments
 (0)