-
Couldn't load subscription status.
- Fork 8k
Request #72189 Add missing CURL_VERSION_* constants
#4093
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -909,6 +909,18 @@ PHP_MINIT_FUNCTION(curl) | |
| REGISTER_CURL_CONSTANT(CURL_VERSION_SSL); | ||
| REGISTER_CURL_CONSTANT(CURL_VERSION_SSPI); | ||
|
|
||
| #if LIBCURL_VERSION_NUM >= 0x071306 /* Available since 7.19.6 */ | ||
| REGISTER_CURL_CONSTANT(CURL_VERSION_CURLDEBUG); | ||
|
||
| #endif | ||
|
|
||
| #if LIBCURL_VERSION_NUM >= 0x072f00 /* Available since 7.47.0 */ | ||
| REGISTER_CURL_CONSTANT(CURL_VERSION_PSL); | ||
| #endif | ||
|
|
||
| #if LIBCURL_VERSION_NUM >= 0x074001 /* Available since 7.64.1 */ | ||
| REGISTER_CURL_CONSTANT(CURL_VERSION_ALTSVC); | ||
| #endif | ||
|
|
||
| /* Available since 7.10.6 */ | ||
| REGISTER_CURL_CONSTANT(CURLOPT_HTTPAUTH); | ||
| /* http authentication options */ | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| --TEST-- | ||
| Request #72189 (Add missing CURL_VERSION_* constants) | ||
| --SKIPIF-- | ||
| <?php | ||
|
|
||
| include 'skipif.inc'; | ||
|
|
||
| $version = curl_version(); | ||
|
|
||
| if ($version['version_number'] < 0x071306) { | ||
| exit('skip: test works only with curl >= 7.19.6'); | ||
| } | ||
|
|
||
| ?> | ||
| --FILE-- | ||
| <?php | ||
|
|
||
| $version = curl_version(); | ||
|
|
||
| $bitfields = [ | ||
| CURL_VERSION_ASYNCHDNS, | ||
| CURL_VERSION_CONV, | ||
| CURL_VERSION_CURLDEBUG, | ||
| CURL_VERSION_DEBUG, | ||
| CURL_VERSION_GSSNEGOTIATE, | ||
| CURL_VERSION_IDN, | ||
| CURL_VERSION_IPV6, | ||
| CURL_VERSION_KERBEROS4, | ||
| CURL_VERSION_LARGEFILE, | ||
| CURL_VERSION_LIBZ, | ||
| CURL_VERSION_NTLM, | ||
| CURL_VERSION_SPNEGO, | ||
| CURL_VERSION_SSL, | ||
| CURL_VERSION_SSPI, | ||
| ]; | ||
|
|
||
| $matchesCount = 0; | ||
|
|
||
| foreach ($bitfields as $feature) { | ||
| if ($version['features'] & $feature) { | ||
| ++$matchesCount; | ||
| } | ||
| } | ||
|
|
||
| var_dump($matchesCount > 0); | ||
|
|
||
| ?> | ||
| --EXPECT-- | ||
| bool(true) |
Uh oh!
There was an error while loading. Please reload this page.