[HttpKernel] Dont close the output stream in debug
This commit is contained in:
parent
86552ea2dc
commit
2fbc2008e5
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Reference in New Issue