8000 [HttpKernel] Fixed RequestDataCollector handling of null header values. by gmoreira · Pull Request #20747 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[HttpKernel] Fixed RequestDataCollector handling of null header values. #20747

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
[HttpKernel] Fixed RequestDataCollector handling of null header values.
  • Loading branch information
Gabriel Moreira committed Dec 5, 2016
commit 2a5ce834b0a1ef53d607769fe829e2c8dd3ac0d5
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ public function collect(Request $request, Response $response, \Exception $except
continue;
}
if ('request_headers' === $key || 'response_headers' === $key) {
$value = array_map(function ($v) { return isset($v[1]) ? $v : (isset($v[0]) ? $v[0] : null); }, $value);
$value = array_map(function ($v) { return isset($v[0]) && !isset($v[1]) ? $v[0] : $v; }, $value);
}
if ('request_server' !== $key && 'request_cookies' !== $key) {
$this->data[$key] = array_map(array($this, 'cloneVar'), $value);
Expand Down
0