Moved most of the logic from ResponseListener to the Response::prepare() method
Moved most of the logic from ResponseListener to the Response::prepare() method

That allows projects that only use HttpFoundation and not HttpKernel to be able to
enforce the HTTP specification "rules".

$request = Request::createFromGlobals();
$response = new Response();

// do whatever you want with the Respons

// enforce HTTP spec
$response->prepare($request);

$response->send();

Within Symfony2, the prepare method is automatically called by the ResponseListener.

symfony/http-foundation,symfony/HttpFoundation,nichdu/HttpFoundation,oswaldderiemaecker/HttpFoundation,mneuhaus/HttpFoundation,ygerasimov/HttpFoundation