Skip to content

Commit 6e9db00

Browse files
Merge branch '5.4' into 6.4
* 5.4: [HttpClient][Mailer] Revert "Let curl handle transfer encoding", use HTTP/1.1 for Mailgun Reviewed Catalan missing translations Fix typo: synchronous -> synchronously [Serializer] Check if exception message in test is correct Ibexa is sponsoring Symfony 5.4, thanks to them! \o/ [String] Add `alias` case to `EnglishInflector`
2 parents 979bda8 + 87ca825 commit 6e9db00

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

CurlHttpClient.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,8 +250,9 @@ public function request(string $method, string $url, array $options = []): Respo
250250

251251
if (isset($options['normalized_headers']['content-length'][0])) {
252252
$curlopts[\CURLOPT_INFILESIZE] = (int) substr($options['normalized_headers']['content-length'][0], \strlen('Content-Length: '));
253-
} elseif (!isset($options['normalized_headers']['transfer-encoding'])) {
254-
$curlopts[\CURLOPT_INFILESIZE] = -1;
253+
}
254+
if (!isset($options['normalized_headers']['transfer-encoding'])) {
255+
$curlopts[\CURLOPT_HTTPHEADER][] = 'Transfer-Encoding:'.(isset($curlopts[\CURLOPT_INFILESIZE]) ? '' : ' chunked');
255256
}
256257

257258
if ('POST' !== $method) {

0 commit comments

Comments
 (0)