public function StreamedResponse::prepare

Prepares the Response before it is sent to the client.

This method tweaks the Response to ensure that it is compliant with RFC 2616. Most of the changes are based on the Request that is "associated" with this Response.

Parameters

Request $request A Request instance:

Return value

Response The current response.

Overrides Response::prepare

File

drupal/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/StreamedResponse.php, line 79

Class

StreamedResponse
StreamedResponse represents a streamed HTTP response.

Namespace

Symfony\Component\HttpFoundation

Code

public function prepare(Request $request) {
  $this->headers
    ->set('Cache-Control', 'no-cache');
  return parent::prepare($request);
}