We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Symfony version(s) affected: 4.4
Description
symfony/src/Symfony/Component/BrowserKit/HttpBrowser.php
Lines 44 to 48 in 8ea7c26
Lines 69 to 73 in 8ea7c26
and it's effectively overwriting the existing one in $headers due the array_merge.
dd($headers, $extraHeaders, array_merge($headers, $extraHeaders));
array:6 [ "user-agent" => "Symfony BrowserKit" "content-type" => "application/json" ] array [ 0 => "Content-Type: text/plain; charset=utf-8" 1 => "Content-Transfer-Encoding: 8bit" ] array [ "user-agent" => "Symfony BrowserKit" "content-type" => "application/json" 0 => "Content-Type: text/plain; charset=utf-8" 1 => "Content-Transfer-Encoding: 8bit" ]
The text was updated successfully, but these errors were encountered:
i used the following patch:
[$body, $extraHeaders] = $this->getBodyAndExtraHeaders($request, isset($headers['content-type']));
private function getBodyAndExtraHeaders(Request $request, bool $hasContentType = false): array
return [$part->bodyToString(), $hasContentType ? [] : $part->getPreparedHeaders()->toArray()];
Sorry, something went wrong.
No branches or pull requests
Symfony version(s) affected: 4.4
Description
symfony/src/Symfony/Component/BrowserKit/HttpBrowser.php
Lines 44 to 48 in 8ea7c26
$extraHeaders includes a content-type, guessed here:
symfony/src/Symfony/Component/BrowserKit/HttpBrowser.php
Lines 69 to 73 in 8ea7c26
and it's effectively overwriting the existing one in $headers due the array_merge.
The text was updated successfully, but these errors were encountered: