[HttpKernel] Dont close the output stream in debug

This commit is contained in:
Nicolas Grekas 2016-06-20 10:11:03 +02:00
parent 86552ea2dc
commit 2fbc2008e5
2 changed files with 8 additions and 6 deletions

View File

@ -373,12 +373,6 @@ class Response
$this->sendHeaders();
$this->sendContent();
if (function_exists('fastcgi_finish_request')) {
fastcgi_finish_request();
} elseif ('cli' !== PHP_SAPI) {
static::closeOutputBuffers(0, true);
}
return $this;
}

View File

@ -149,6 +149,14 @@ abstract class Kernel implements KernelInterface, TerminableInterface
}
if ($this->getHttpKernel() instanceof TerminableInterface) {
if (!$this->debug) {
if (function_exists('fastcgi_finish_request')) {
fastcgi_finish_request();
} elseif ('cli' !== PHP_SAPI) {
Response::closeOutputBuffers(0, true);
}
}
$this->getHttpKernel()->terminate($request, $response);
}
}