8000 [HttpClient] Allow using HTTP/3 with the `CurlHttpClient` · symfony/symfony@a7fc957 · GitHub
[go: up one dir, main page]

Skip to content

Commit a7fc957

Browse files
committed
[HttpClient] Allow using HTTP/3 with the CurlHttpClient
1 parent 1ea7204 commit a7fc957

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

src/Symfony/Component/HttpClient/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ CHANGELOG
55
---
66

77
* Add IPv6 support to `NativeHttpClient`
8+
* Allow using HTTP/3 with the `CurlHttpClient`
89

910
7.2
1011
---

src/Symfony/Component/HttpClient/CurlHttpClient.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,8 @@ public function request(string $method, string $url, array $options = []): Respo
143143
$curlopts[\CURLOPT_HTTP_VERSION] = \CURL_HTTP_VERSION_1_1;
144144
} elseif (\defined('CURL_VERSION_HTTP2') && (\CURL_VERSION_HTTP2 & CurlClientState::$curlVersion['features']) && ('https:' === $scheme || 2.0 === (float) $options['http_version'])) {
145145
$curlopts[\CURLOPT_HTTP_VERSION] = \CURL_HTTP_VERSION_2_0;
146+
} elseif (\defined('CURL_VERSION_HTTP3') && (\CURL_VERSION_HTTP3 & CurlClientState::$curlVersion['features']) && 3.0 === (float) $options['http_version']) {
147+
$curlopts[\CURLOPT_HTTP_VERSION] = \CURL_HTTP_VERSION_3;
146148
}
147149

148150
if (isset($options['auth_ntlm'])) {

0 commit comments

Comments
 (0)
0