-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Curl: Add CURL_HTTP_VERSION_3
constant
#12543
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
Closed
Closed
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
Declares the `CURL_HTTP_VERSION_3`, along with the arginfo updates. This should be supported in Curl 7.66 and later, and we already have `CURL_VERSION_HTTP3` constant declared. However, there are not the same. `CURL_HTTP_VERSION_3` (int 30) is one of the `CURLOPT_HTTP_VERSION` options, while `CURL_VERSION_HTTP3` is the feature flag bitmask. `CURL_VERSION_HTTP3` is declared since PHP 8.2.
Ayesh
added a commit
to Ayesh/php-src
that referenced
this pull request
Oct 28, 2023
- Updates the URL of Curl constant page from `https://curl.haxx.se/libcurl/c/symbols-in-versions.html` to `https://curl.se/libcurl/c/symbols-in-versions.html`. - Fixes the regex used to filter constants to match `CURL_HTTP` constants. Related: php#12543
@bukka for the cURL constants. |
Girgias
pushed a commit
that referenced
this pull request
Oct 28, 2023
- Updates the URL of Curl constant page from `https://curl.haxx.se/libcurl/c/symbols-in-versions.html` to `https://curl.se/libcurl/c/symbols-in-versions.html`. - Fixes the regex used to filter constants to match `CURL_HTTP` constants. Related: GH-12543
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this not a duplicate of #12000?
Apparently it is @GrahamCampbell, I will close this. Apologies about the noise. |
Ayesh
added a commit
to Ayesh/php-src
that referenced
this pull request
Aug 11, 2024
This intends to supersede the two following PRs: - php#12000 because it does not modify the stub file, but only update the arginfo file. It also proposes to merge to GA branches, and is currently marked as Requires RM Approval. - php#12543 Essentially the same as this PR and from the same author, as this, but its about a year old and requires rebasing anyway. This adds the `CURL_HTTP_VERSION_3` and `CURL_HTTP_VERSION_3ONLY` constants on relevant versions (7.66 and 7.88 respectively). It is possible to use HTTP/3 without having these constants declared, but having them declared in PHP makes things more approachable and "official".
Ayesh
added a commit
to Ayesh/php-src
that referenced
this pull request
Aug 12, 2024
This intends to supersede the two following PRs: - php#12000 because it does not modify the stub file, but only update the arginfo file. It also proposes to merge to GA branches, and is currently marked as Requires RM Approval. - php#12543 Essentially the same as this PR and from the same author, as this, but its about a year old and requires rebasing anyway. This adds the `CURL_HTTP_VERSION_3` and `CURL_HTTP_VERSION_3ONLY` constants on relevant versions (7.66 and 7.88 respectively). It is possible to use HTTP/3 without having these constants declared, but having them declared in PHP makes things more approachable and "official".
Girgias
pushed a commit
that referenced
this pull request
Aug 12, 2024
This intends to supersede the two following PRs: - #12000 because it does not modify the stub file, but only update the arginfo file. It also proposes to merge to GA branches, and is currently marked as Requires RM Approval. - #12543 Essentially the same as this PR and from the same author, as this, but its about a year old and requires rebasing anyway. This adds the `CURL_HTTP_VERSION_3` and `CURL_HTTP_VERSION_3ONLY` constants on relevant versions (7.66 and 7.88 respectively). It is possible to use HTTP/3 without having these constants declared, but having them declared in PHP makes things more approachable and "official".
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.
Declares the
CURL_HTTP_VERSION_3
(libcurl >= 7.66), along with the arginfo updates.We already have
CURL_VERSION_HTTP3
constant declared. However, there are not the same.CURL_HTTP_VERSION_3
(int 30) is one of theCURLOPT_HTTP_VERSION
options, whileCURL_VERSION_HTTP3
is the feature flag bitmask.None of the default repos include libcurl with HTTP/3 support enabled, but I could manually get it to work by compiling libcurl with
nghttp3
,ngtcp2
, and patchedopenssl
. Without this patch, it is still possible to make HTTP/3 requests withcurl_setopt($ch, CURLOPT_HTTP_VERSION, 30);
. This patch merely declares the constant for the parity.Considering we already declare
CURL_VERSION_HTTP3
feature-flag constant (since PHP 8.2), I think the lack ofCURL_HTTP_VERSION_3
constant is a bit odd. Both constants were declared in the same upstream version (7.66). Also taking it into consideration the rapid HTTP/3 adoption, I would like to request to consider bringing this change to PHP-8.3 branch as well, although we are only a single release candidate behind the first GA.