8000 [HttpClient] fix merge · symfony/symfony@4ed4367 · GitHub
[go: up one dir, main page]

Skip to content

Commit 4ed4367

Browse files
[HttpClient] fix merge
1 parent b191e69 commit 4ed4367

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/HttpClient/HttpClientTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ private static function prepareRequest(?string $method, ?string $url, array $opt
9797
}
9898

9999
if (isset($options['body'])) {
100-
if (\is_array($options['body']) && !isset($options['normalized_headers']['content-type'])) {
100+
if (\is_array($options['body']) && (!isset($options['normalized_headers']['content-type'][0]) || !str_contains($options['normalized_headers']['content-type'][0], 'application/x-www-form-urlencoded'))) {
101101
$options['normalized_headers']['content-type'] = ['Content-Type: application/x-www-form-urlencoded'];
102102
}
103103

0 commit comments

Comments
 (0)
0