Skip to content

Commit 28c8065

Browse files
Merge branch '7.1' into 7.2
* 7.1: (21 commits) [Serializer] [ObjectNormalizer] Use bool filter when FILTER_BOOL is set [HttpClient][Mailer] Revert "Let curl handle transfer encoding", use HTTP/1.1 for Mailgun Reviewed Catalan missing translations [AssetMapper] Upgrade importmap polyfill [HttpClient] Fix initializing InformationalChunk Fix typo: synchronous -> synchronously forward exceptions caught in the AbstractObjectNormalizer [Serializer] Check if exception message in test is correct [Serializer] Check if exception message in test is correct take the new DOM HTMLElement class into account Ibexa is sponsoring Symfony 5.4, thanks to them! \o/ [FrameworkBundle] Fix warming up routes [VarDumper] Fix `FFICaster` test to be platform-adaptable [String] Add `alias` case to `EnglishInflector` [FrameworkBundle] Throw runtime exception when trying to use asset-mapper while http-client is disabled [SecurityBundle] Remove unused memory users’ `name` attribute from the XSD [VarExporter] generate __doUnserialize() method in ProxyHelper::generateLazyProxy() Double check if pcntl function exists Add additional headers in Scaleway bridge [VarDumper] Fix FFI caster test ...
2 parents fd30abe + 90ace27 commit 28c8065

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

Chunk/InformationalChunk.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ class InformationalChunk extends DataChunk
2323
public function __construct(int $statusCode, array $headers)
2424
{
2525
$this->status = [$statusCode, $headers];
26+
27+
parent::__construct();
2628
}
2729

2830
public function getInformationalStatus(): ?array

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)