Update to Drupal 8.2.6. For more information, see https://www.drupal.org/project/drupal/releases/8.2.6
This commit is contained in:
parent
db56c09587
commit
f1e72395cb
588 changed files with 26857 additions and 2777 deletions
|
@ -28,6 +28,7 @@ class StreamedResponse extends Response
|
|||
{
|
||||
protected $callback;
|
||||
protected $streamed;
|
||||
private $headersSent;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
|
@ -44,6 +45,7 @@ class StreamedResponse extends Response
|
|||
$this->setCallback($callback);
|
||||
}
|
||||
$this->streamed = false;
|
||||
$this->headersSent = false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -53,7 +55,7 @@ class StreamedResponse extends Response
|
|||
* @param int $status The response status code
|
||||
* @param array $headers An array of response headers
|
||||
*
|
||||
* @return StreamedResponse
|
||||
* @return static
|
||||
*/
|
||||
public static function create($callback = null, $status = 200, $headers = array())
|
||||
{
|
||||
|
@ -75,6 +77,22 @@ class StreamedResponse extends Response
|
|||
$this->callback = $callback;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* This method only sends the headers once.
|
||||
*/
|
||||
public function sendHeaders()
|
||||
{
|
||||
if ($this->headersSent) {
|
||||
return;
|
||||
}
|
||||
|
||||
$this->headersSent = true;
|
||||
|
||||
parent::sendHeaders();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
|
|
Reference in a new issue