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 a7fc957

Browse filesBrowse files
committed
[HttpClient] Allow using HTTP/3 with the CurlHttpClient
1 parent 1ea7204 commit a7fc957
Copy full SHA for a7fc957

File tree

Expand file treeCollapse file tree

2 files changed

+3
-0
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+3
-0
lines changed

‎src/Symfony/Component/HttpClient/CHANGELOG.md

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpClient/CHANGELOG.md
+1Lines 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

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpClient/CurlHttpClient.php
+2Lines 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)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.