-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
CurlDownloader - Add support for HTTP/3 #12363
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Member
|
Thanks, looks good |
Contributor
Author
|
@danshumaker this will only add support for HTTP/3, but not change if HTTP/3 is not supported by Curl. Right now, none of the mainstream distros ship a ext-curl build with HTTP/3 enabled. So about that SO question, this PR won't help, unfortunately. |
|
Thank you @Ayesh . |
tangrufus
added a commit
to typisttech/wp-org-closed-plugin
that referenced
this pull request
Nov 14, 2025
Hack to diallow HTTP/3, foring `HttpDownloader`` to use `RemoteFilesystem`` instead of `CurlDownloader`.
I suspect api.wordpress.org does not properly support HTTP/3:
$ curl --http1.1 'https://api.wordpress.org/plugins/info/1.2/?action=plugin_information&slug=better-delete-revision'
...json response
$ curl --http2 'https://api.wordpress.org/plugins/info/1.2/?action=plugin_information&slug=better-delete-revision'
...json response
$ curl --http3-only 'https://api.wordpress.org/plugins/info/1.2/?action=plugin_information&slug=better-delete-revision'
...sometimes json response
...but most of the time ERR_DRAINING
curl: (56) ngtcp2_conn_writev_stream returned error: ERR_DRAINING
See:
- composer/composer#12363
- https://github.com/composer/composer/blob/f5854b140ca27164d352ce30deece798acf3e36b/src/Composer/Util/HttpDownloader.php#L537
tangrufus
added a commit
to typisttech/wp-org-closed-plugin
that referenced
this pull request
Nov 14, 2025
Hack to disallow HTTP/3, forcing `HttpDownloader` to use `RemoteFilesystem` instead of `CurlDownloader`.
I suspect api.wordpress.org does not properly support HTTP/3:
$ curl --http1.1 'https://api.wordpress.org/plugins/info/1.2/?action=plugin_information&slug=better-delete-revision'
...json response
$ curl --http2 'https://api.wordpress.org/plugins/info/1.2/?action=plugin_information&slug=better-delete-revision'
...json response
$ curl --http3-only 'https://api.wordpress.org/plugins/info/1.2/?action=plugin_information&slug=better-delete-revision'
...sometimes json response
...but most of the time ERR_DRAINING
curl: (56) ngtcp2_conn_writev_stream returned error: ERR_DRAINING
See:
- composer/composer#12363
- https://github.com/composer/composer/blob/f5854b140ca27164d352ce30deece798acf3e36b/src/Composer/Util/HttpDownloader.php#L537
tangrufus
added a commit
to typisttech/wp-org-closed-plugin
that referenced
this pull request
Nov 14, 2025
Hack to disallow HTTP/3, forcing `HttpDownloader` to use `RemoteFilesystem` instead of `CurlDownloader`.
I suspect api.wordpress.org does not properly support HTTP/3:
$ curl --http1.1 'https://api.wordpress.org/plugins/info/1.2/?action=plugin_information&slug=better-delete-revision'
...json response
$ curl --http2 'https://api.wordpress.org/plugins/info/1.2/?action=plugin_information&slug=better-delete-revision'
...json response
$ curl --http3-only 'https://api.wordpress.org/plugins/info/1.2/?action=plugin_information&slug=better-delete-revision'
...sometimes json response
...but most of the time ERR_DRAINING
curl: (56) ngtcp2_conn_writev_stream returned error: ERR_DRAINING
See:
- composer/composer#12363
- https://github.com/composer/composer/blob/f5854b140ca27164d352ce30deece798acf3e36b/src/Composer/Util/HttpDownloader.php#L537
tangrufus
added a commit
to typisttech/wp-org-closed-plugin
that referenced
this pull request
Nov 14, 2025
Hack to disallow HTTP/3, forcing `HttpDownloader` to use `RemoteFilesystem` instead of `CurlDownloader`.
I suspect api.wordpress.org does not properly support HTTP/3:
$ curl --http1.1 'https://api.wordpress.org/plugins/info/1.2/?action=plugin_information&slug=better-delete-revision'
...json response
$ curl --http2 'https://api.wordpress.org/plugins/info/1.2/?action=plugin_information&slug=better-delete-revision'
...json response
$ curl --http3-only 'https://api.wordpress.org/plugins/info/1.2/?action=plugin_information&slug=better-delete-revision'
...sometimes json response
...but most of the time ERR_DRAINING
curl: (56) ngtcp2_conn_writev_stream returned error: ERR_DRAINING
See:
- composer/composer#12363
- https://github.com/composer/composer/blob/f5854b140ca27164d352ce30deece798acf3e36b/src/Composer/Util/HttpDownloader.php#L537
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PHP 8.4 should be able to support HTTP/3 if the Curl extension is compiled with an OpenSSL branch with HTTP/3 support.
GitHub, GitLab, and packagist.org do not seem to support HTTP/3 yet, but we can still safely enable HTTP/3 if it's available to future-proof it.
This also updates the
diagnosecommand to show the HTTP versions supported.