Skip to content

Commit

Permalink
Merge branch '5.4' into 6.4
Browse files Browse the repository at this point in the history
* 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`
  • Loading branch information
nicolas-grekas committed Jun 28, 2024
2 parents 979bda8 + 87ca825 commit 6e9db00
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions CurlHttpClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -250,8 +250,9 @@ public function request(string $method, string $url, array $options = []): Respo

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

if ('POST' !== $method) {
Expand Down

0 comments on commit 6e9db00

Please sign in to comment.