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.
Request $request A Request instance:
Response The current response.
Overrides Response::prepare
public function prepare(Request $request) {
if ('HTTP/1.0' != $request->server
->get('SERVER_PROTOCOL')) {
$this
->setProtocolVersion('1.1');
}
$this->headers
->set('Cache-Control', 'no-cache');
return parent::prepare($request);
}