minor #21001 [HttpKernel] Continuation of #20569 (ro0NL)

This PR was merged into the 3.3-dev branch.

Discussion
----------

[HttpKernel] Continuation of #20569

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/20567#discussion_r92928110
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!--highly recommended for new features-->

Forgotten in #20569 and makes #20567 truly a feature only.

Before

![image](https://cloud.githubusercontent.com/assets/1047696/21361738/971e4f8e-c6e5-11e6-8b08-8a5f8ab4f1f0.png)

After

![image](https://cloud.githubusercontent.com/assets/1047696/21361752/a6dc5380-c6e5-11e6-9f18-3bc3d7db94be.png)

Commits
-------

e1616b3 [HttpKernel] Continuation of #20569
This commit is contained in:
Fabien Potencier 2016-12-22 11:32:39 +01:00
commit d73dd8b66e

View File

@ -39,11 +39,6 @@ class RequestDataCollector extends DataCollector implements EventSubscriberInter
*/
public function collect(Request $request, Response $response, \Exception $exception = null)
{
$responseHeaders = $response->headers->all();
foreach ($response->headers->getCookies() as $cookie) {
$responseHeaders['set-cookie'][] = (string) $cookie;
}
// attributes are serialized and as they can be anything, they need to be converted to strings.
$attributes = array();
$route = '';
@ -95,7 +90,7 @@ class RequestDataCollector extends DataCollector implements EventSubscriberInter
'request_cookies' => $request->cookies->all(),
'request_attributes' => $attributes,
'route' => $route,
'response_headers' => $responseHeaders,
'response_headers' => $response->headers->all(),
'session_metadata' => $sessionMetadata,
'session_attributes' => $sessionAttributes,
'flashes' => $flashes,