Skip to content

Commit c7f83b2

Browse files
committed
Merge branch '5.4' into 6.4
* 5.4: explicitly mark nullable parameters as nullable fix low deps tests [HttpKernel] Fix datacollector caster for reference object property bug #51578 [Cache] always select database for persistent redis connections [Security] Validate that CSRF token in form login is string similar to username/password [validator] validated Dutch translation Improve dutch translations [Translation] Skip state=needs-translation entries only when source == target [HttpKernel] Ensure controllers are not lazy [Validator] Fill in trans-unit id 113: This URL does not contain a TLD. [Validator] added missing Polish translation for unit 113 [Validator] add missing lv translation [HttpClient] Let curl handle transfer encoding [Messenger] Make Doctrine connection ignore unrelated tables on setup [HttpFoundation] Set content-type header in RedirectResponse add translations for the requireTld constraint option message [Serializer] Fix unexpected allowed attributes [FrameworkBundle] Fix registration of the bundle path to translation
2 parents bdea420 + ead44ee commit c7f83b2

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

CurlHttpClient.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -250,9 +250,8 @@ 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-
}
254-
if (!isset($options['normalized_headers']['transfer-encoding'])) {
255-
$curlopts[\CURLOPT_HTTPHEADER][] = 'Transfer-Encoding:'.(isset($curlopts[\CURLOPT_INFILESIZE]) ? '' : ' chunked');
253+
} elseif (!isset($options['normalized_headers']['transfer-encoding'])) {
254+
$curlopts[\CURLOPT_INFILESIZE] = -1;
256255
}
257256

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

0 commit comments

Comments
 (0)