bug #33547 [HttpClient] Re-enable Server Push support (dunglas)

This PR was merged into the 4.3 branch.

Discussion
----------

[HttpClient] Re-enable Server Push support

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | no
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | n/a <!-- prefix each issue number with "Fix #", if any -->
| License       | MIT
| Doc PR        | n/a

 #33444 disabled Server Push support for the CURL implementation, but `HttpClient::create()` has been forgotten and override this parameter, consequently for most users Server Push wasn't disabled at all. The root issue affecting the tests are actually a misconfiguration of Akamai servers (we need our own test infrastructure).

According to my testing, Server Push support works very smoothly. Also, it can cause problems only if the server actually pushes responses (which is still rare).

So I propose to re-enable Push Support everywhere.

Commits
-------

8483842888 Re-enable push support for HttpClient
This commit is contained in:
Nicolas Grekas 2019-09-11 10:32:37 +02:00
commit 22b4586c01

View File

@ -55,7 +55,7 @@ final class CurlHttpClient implements HttpClientInterface, LoggerAwareInterface
*
* @see HttpClientInterface::OPTIONS_DEFAULTS for available options
*/
public function __construct(array $defaultOptions = [], int $maxHostConnections = 6, int $maxPendingPushes = 0)
public function __construct(array $defaultOptions = [], int $maxHostConnections = 6, int $maxPendingPushes = 50)
{
if (!\extension_loaded('curl')) {
throw new \LogicException('You cannot use the "Symfony\Component\HttpClient\CurlHttpClient" as the "curl" extension is not installed.');