Skip to content

Commit 0c5353a

Browse files
Merge branch '5.4' into 6.0
* 5.4: [Dotenv] Decouple DotenvDumpCommand from FrameworkBundle [Dotenv] Reimplementing symfony/flex' dump-env as a Symfony command [PHPUnitBridge] Fix skipping triggering file override on 5.3 Do not override correct triggering file for return type deprecations [HttpClient] accept headers when CURLE_RECV_ERROR is received before the content Use PHPUnit 9.5 on PHP 8.1 [Serializer] Attributes that extends the serializer`s annotations do not ignore by the serialization process
2 parents 3a0d3a7 + 8927183 commit 0c5353a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Response/CurlResponse.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,10 @@ private static function perform(ClientState $multi, array &$responses = null): v
315315
}
316316
}
317317

318+
if (\CURLE_RECV_ERROR === $result && 'H' === $waitFor[0] && 400 <= ($responses[(int) $ch]->info['http_code'] ?? 0)) {
319+
$multi->handlesActivity[$id][] = new FirstChunk();
320+
}
321+
318322
$multi->handlesActivity[$id][] = null;
319323
$multi->handlesActivity[$id][] = \in_array($result, [\CURLE_OK, \CURLE_TOO_MANY_REDIRECTS], true) || '_0' === $waitFor || curl_getinfo($ch, \CURLINFO_SIZE_DOWNLOAD) === curl_getinfo($ch, \CURLINFO_CONTENT_LENGTH_DOWNLOAD) ? null : new TransportException(ucfirst(curl_error($ch) ?: curl_strerror($result)).sprintf(' for "%s".', curl_getinfo($ch, \CURLINFO_EFFECTIVE_URL)));
320324
}

0 commit comments

Comments
 (0)