Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 1f34133

Browse filesBrowse files
[HttpClient] Disable HTTP/2 PUSH by default when using curl
1 parent f3e0c81 commit 1f34133
Copy full SHA for 1f34133

File tree

Expand file treeCollapse file tree

2 files changed

+5
-1
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

2 files changed

+5
-1
lines changed
Open diff view settings
Collapse file

‎src/Symfony/Component/HttpClient/CurlHttpClient.php‎

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpClient/CurlHttpClient.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ final class CurlHttpClient implements HttpClientInterface, LoggerAwareInterface,
6767
*
6868
* @see HttpClientInterface::OPTIONS_DEFAULTS for available options
6969
*/
70-
public function __construct(array $defaultOptions = [], int $maxHostConnections = 6, int $maxPendingPushes = 50)
70+
public function __construct(array $defaultOptions = [], int $maxHostConnections = 6, int $maxPendingPushes = 0)
7171
{
7272
if (!\extension_loaded('curl')) {
7373
throw new \LogicException('You cannot use the "Symfony\Component\HttpClient\CurlHttpClient" as the "curl" extension is not installed.');
Collapse file

‎src/Symfony/Component/HttpClient/Tests/CurlHttpClientTest.php‎

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpClient/Tests/CurlHttpClientTest.php
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ protected function getHttpClient(string $testCase): HttpClientInterface
3232
}
3333
}
3434

35+
if (str_contains($testCase, 'Push')) {
36+
return new CurlHttpClient(['verify_peer' => false, 'verify_host' => false], 6, 50);
37+
}
38+
3539
return new CurlHttpClient(['verify_peer' => false, 'verify_host' => false]);
3640
}
3741

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.